// 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_Primitives_H
#define WINRT_Microsoft_UI_Xaml_Controls_Primitives_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.Controls.h"
#include "winrt/impl/Microsoft.UI.Composition.2.h"
#include "winrt/impl/Microsoft.UI.Input.2.h"
#include "winrt/impl/Microsoft.UI.Xaml.2.h"
#include "winrt/impl/Microsoft.UI.Xaml.Automation.Peers.2.h"
#include "winrt/impl/Microsoft.UI.Xaml.Controls.2.h"
#include "winrt/impl/Microsoft.UI.Xaml.Data.2.h"
#include "winrt/impl/Microsoft.UI.Xaml.Input.2.h"
#include "winrt/impl/Microsoft.UI.Xaml.Media.2.h"
#include "winrt/impl/Microsoft.UI.Xaml.Media.Animation.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.UI.2.h"
#include "winrt/impl/Microsoft.UI.Xaml.Controls.Primitives.2.h"
namespace winrt::impl
{
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IAppBarButtonTemplateSettings<D>::KeyboardAcceleratorTextMinWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarButtonTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarButtonTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarButtonTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_KeyboardAcceleratorTextMinWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarButtonTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_KeyboardAcceleratorTextMinWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IAppBarTemplateSettings<D>::ClipRect() const
    {
        winrt::Windows::Foundation::Rect value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ClipRect(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_ClipRect(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IAppBarTemplateSettings<D>::CompactVerticalDelta() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CompactVerticalDelta(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_CompactVerticalDelta(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IAppBarTemplateSettings<D>::CompactRootMargin() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CompactRootMargin(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_CompactRootMargin(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IAppBarTemplateSettings<D>::MinimalVerticalDelta() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinimalVerticalDelta(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_MinimalVerticalDelta(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IAppBarTemplateSettings<D>::MinimalRootMargin() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinimalRootMargin(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_MinimalRootMargin(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IAppBarTemplateSettings<D>::HiddenVerticalDelta() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HiddenVerticalDelta(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_HiddenVerticalDelta(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IAppBarTemplateSettings<D>::HiddenRootMargin() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HiddenRootMargin(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_HiddenRootMargin(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IAppBarTemplateSettings<D>::NegativeCompactVerticalDelta() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NegativeCompactVerticalDelta(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_NegativeCompactVerticalDelta(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IAppBarTemplateSettings<D>::NegativeMinimalVerticalDelta() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NegativeMinimalVerticalDelta(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_NegativeMinimalVerticalDelta(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IAppBarTemplateSettings<D>::NegativeHiddenVerticalDelta() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NegativeHiddenVerticalDelta(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_NegativeHiddenVerticalDelta(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IAppBarToggleButtonTemplateSettings<D>::KeyboardAcceleratorTextMinWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarToggleButtonTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarToggleButtonTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarToggleButtonTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_KeyboardAcceleratorTextMinWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarToggleButtonTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_KeyboardAcceleratorTextMinWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IAutoSuggestBoxHelperStatics<D>::KeepInteriorCornersSquareProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IAutoSuggestBoxHelperStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAutoSuggestBoxHelperStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAutoSuggestBoxHelperStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_KeepInteriorCornersSquareProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAutoSuggestBoxHelperStatics>**)this;
            check_hresult(_winrt_abi_type->get_KeepInteriorCornersSquareProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IAutoSuggestBoxHelperStatics<D>::SetKeepInteriorCornersSquare(winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBox const& autoSuggestBox, bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IAutoSuggestBoxHelperStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAutoSuggestBoxHelperStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAutoSuggestBoxHelperStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetKeepInteriorCornersSquare(*(void**)(&autoSuggestBox), value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAutoSuggestBoxHelperStatics>**)this;
            check_hresult(_winrt_abi_type->SetKeepInteriorCornersSquare(*(void**)(&autoSuggestBox), value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IAutoSuggestBoxHelperStatics<D>::GetKeepInteriorCornersSquare(winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBox const& autoSuggestBox) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IAutoSuggestBoxHelperStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAutoSuggestBoxHelperStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAutoSuggestBoxHelperStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetKeepInteriorCornersSquare(*(void**)(&autoSuggestBox), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAutoSuggestBoxHelperStatics>**)this;
            check_hresult(_winrt_abi_type->GetKeepInteriorCornersSquare(*(void**)(&autoSuggestBox), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IButtonBase<D>::ClickMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ClickMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ClickMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase>**)this;
            check_hresult(_winrt_abi_type->get_ClickMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IButtonBase<D>::ClickMode(winrt::Microsoft::UI::Xaml::Controls::ClickMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ClickMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase>**)this;
            check_hresult(_winrt_abi_type->put_ClickMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IButtonBase<D>::IsPointerOver() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsPointerOver(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase>**)this;
            check_hresult(_winrt_abi_type->get_IsPointerOver(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IButtonBase<D>::IsPressed() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsPressed(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase>**)this;
            check_hresult(_winrt_abi_type->get_IsPressed(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IButtonBase<D>::Command() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Command(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase>**)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_Primitives_IButtonBase<D>::Command(winrt::Microsoft::UI::Xaml::Input::ICommand const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase>**)&_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::Primitives::IButtonBase>**)this;
            check_hresult(_winrt_abi_type->put_Command(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IButtonBase<D>::CommandParameter() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CommandParameter(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase>**)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_Primitives_IButtonBase<D>::CommandParameter(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase>**)&_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::Primitives::IButtonBase>**)this;
            check_hresult(_winrt_abi_type->put_CommandParameter(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IButtonBase<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::Primitives::IButtonBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase>**)&_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::Primitives::IButtonBase>**)this;
            check_hresult(_winrt_abi_type->add_Click(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IButtonBase<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_Primitives_IButtonBase<D>::Click(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase>**)&_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::Primitives::IButtonBase>**)this;
            _winrt_abi_type->remove_Click(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IButtonBaseFactory<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::Primitives::IButtonBaseFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBaseFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBaseFactory>**)&_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::Primitives::IButtonBaseFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::ButtonBase{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IButtonBaseStatics<D>::ClickModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ClickModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_ClickModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IButtonBaseStatics<D>::IsPointerOverProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsPointerOverProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsPointerOverProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IButtonBaseStatics<D>::IsPressedProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsPressedProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsPressedProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IButtonBaseStatics<D>::CommandProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CommandProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBaseStatics>**)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_Primitives_IButtonBaseStatics<D>::CommandParameterProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CommandParameterProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBaseStatics>**)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_Primitives_ICalendarViewTemplateSettings<D>::MinViewWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinViewWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_MinViewWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICalendarViewTemplateSettings<D>::HeaderText() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HeaderText(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_HeaderText(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICalendarViewTemplateSettings<D>::WeekDay1() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_WeekDay1(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_WeekDay1(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICalendarViewTemplateSettings<D>::WeekDay2() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_WeekDay2(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_WeekDay2(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICalendarViewTemplateSettings<D>::WeekDay3() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_WeekDay3(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_WeekDay3(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICalendarViewTemplateSettings<D>::WeekDay4() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_WeekDay4(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_WeekDay4(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICalendarViewTemplateSettings<D>::WeekDay5() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_WeekDay5(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_WeekDay5(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICalendarViewTemplateSettings<D>::WeekDay6() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_WeekDay6(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_WeekDay6(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICalendarViewTemplateSettings<D>::WeekDay7() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_WeekDay7(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_WeekDay7(&value));
        }
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICalendarViewTemplateSettings<D>::HasMoreContentAfter() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HasMoreContentAfter(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_HasMoreContentAfter(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICalendarViewTemplateSettings<D>::HasMoreContentBefore() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HasMoreContentBefore(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_HasMoreContentBefore(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICalendarViewTemplateSettings<D>::HasMoreViews() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HasMoreViews(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_HasMoreViews(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICalendarViewTemplateSettings<D>::ClipRect() const
    {
        winrt::Windows::Foundation::Rect value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ClipRect(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_ClipRect(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICalendarViewTemplateSettings<D>::CenterX() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CenterX(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_CenterX(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICalendarViewTemplateSettings<D>::CenterY() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CenterY(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_CenterY(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICarouselPanel<D>::CanVerticallyScroll() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanVerticallyScroll(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)this;
            check_hresult(_winrt_abi_type->get_CanVerticallyScroll(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICarouselPanel<D>::CanVerticallyScroll(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CanVerticallyScroll(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)this;
            check_hresult(_winrt_abi_type->put_CanVerticallyScroll(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICarouselPanel<D>::CanHorizontallyScroll() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanHorizontallyScroll(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)this;
            check_hresult(_winrt_abi_type->get_CanHorizontallyScroll(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICarouselPanel<D>::CanHorizontallyScroll(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CanHorizontallyScroll(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)this;
            check_hresult(_winrt_abi_type->put_CanHorizontallyScroll(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICarouselPanel<D>::ExtentWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExtentWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)this;
            check_hresult(_winrt_abi_type->get_ExtentWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICarouselPanel<D>::ExtentHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExtentHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)this;
            check_hresult(_winrt_abi_type->get_ExtentHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICarouselPanel<D>::ViewportWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ViewportWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)this;
            check_hresult(_winrt_abi_type->get_ViewportWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICarouselPanel<D>::ViewportHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ViewportHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)this;
            check_hresult(_winrt_abi_type->get_ViewportHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICarouselPanel<D>::HorizontalOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICarouselPanel<D>::VerticalOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)this;
            check_hresult(_winrt_abi_type->get_VerticalOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICarouselPanel<D>::ScrollOwner() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ScrollOwner(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)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_Primitives_ICarouselPanel<D>::ScrollOwner(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)&_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::Primitives::ICarouselPanel>**)this;
            check_hresult(_winrt_abi_type->put_ScrollOwner(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICarouselPanel<D>::LineUp() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->LineUp());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)this;
            check_hresult(_winrt_abi_type->LineUp());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICarouselPanel<D>::LineDown() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->LineDown());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)this;
            check_hresult(_winrt_abi_type->LineDown());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICarouselPanel<D>::LineLeft() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->LineLeft());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)this;
            check_hresult(_winrt_abi_type->LineLeft());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICarouselPanel<D>::LineRight() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->LineRight());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)this;
            check_hresult(_winrt_abi_type->LineRight());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICarouselPanel<D>::PageUp() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->PageUp());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)this;
            check_hresult(_winrt_abi_type->PageUp());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICarouselPanel<D>::PageDown() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->PageDown());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)this;
            check_hresult(_winrt_abi_type->PageDown());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICarouselPanel<D>::PageLeft() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->PageLeft());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)this;
            check_hresult(_winrt_abi_type->PageLeft());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICarouselPanel<D>::PageRight() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->PageRight());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)this;
            check_hresult(_winrt_abi_type->PageRight());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICarouselPanel<D>::MouseWheelUp() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->MouseWheelUp());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)this;
            check_hresult(_winrt_abi_type->MouseWheelUp());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICarouselPanel<D>::MouseWheelDown() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->MouseWheelDown());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)this;
            check_hresult(_winrt_abi_type->MouseWheelDown());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICarouselPanel<D>::MouseWheelLeft() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->MouseWheelLeft());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)this;
            check_hresult(_winrt_abi_type->MouseWheelLeft());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICarouselPanel<D>::MouseWheelRight() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->MouseWheelRight());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)this;
            check_hresult(_winrt_abi_type->MouseWheelRight());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICarouselPanel<D>::SetHorizontalOffset(double offset) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetHorizontalOffset(offset));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)this;
            check_hresult(_winrt_abi_type->SetHorizontalOffset(offset));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICarouselPanel<D>::SetVerticalOffset(double offset) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetVerticalOffset(offset));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)this;
            check_hresult(_winrt_abi_type->SetVerticalOffset(offset));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICarouselPanel<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::Primitives::ICarouselPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>**)&_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::Primitives::ICarouselPanel>**)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_Primitives_ICarouselPanelFactory<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::Primitives::ICarouselPanelFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanelFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanelFactory>**)&_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::Primitives::ICarouselPanelFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::CarouselPanel{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorPickerSlider<D>::ColorChannel() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ColorPickerHsvChannel value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorPickerSlider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorPickerSlider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorPickerSlider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ColorChannel(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorPickerSlider>**)this;
            check_hresult(_winrt_abi_type->get_ColorChannel(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorPickerSlider<D>::ColorChannel(winrt::Microsoft::UI::Xaml::Controls::ColorPickerHsvChannel const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorPickerSlider>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorPickerSlider, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorPickerSlider>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ColorChannel(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorPickerSlider>**)this;
            check_hresult(_winrt_abi_type->put_ColorChannel(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorPickerSliderFactory<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::Primitives::IColorPickerSliderFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorPickerSliderFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorPickerSliderFactory>**)&_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::Primitives::IColorPickerSliderFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::ColorPickerSlider{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorPickerSliderStatics<D>::ColorChannelProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorPickerSliderStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorPickerSliderStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorPickerSliderStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ColorChannelProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorPickerSliderStatics>**)this;
            check_hresult(_winrt_abi_type->get_ColorChannelProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorSpectrum<D>::Color() const
    {
        winrt::Windows::UI::Color value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)&_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::Primitives::IColorSpectrum>**)this;
            check_hresult(_winrt_abi_type->get_Color(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorSpectrum<D>::Color(winrt::Windows::UI::Color const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)&_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::Primitives::IColorSpectrum>**)this;
            check_hresult(_winrt_abi_type->put_Color(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorSpectrum<D>::HsvColor() const
    {
        winrt::Windows::Foundation::Numerics::float4 value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HsvColor(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)this;
            check_hresult(_winrt_abi_type->get_HsvColor(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorSpectrum<D>::HsvColor(winrt::Windows::Foundation::Numerics::float4 const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HsvColor(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)this;
            check_hresult(_winrt_abi_type->put_HsvColor(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorSpectrum<D>::MinHue() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinHue(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)this;
            check_hresult(_winrt_abi_type->get_MinHue(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorSpectrum<D>::MinHue(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MinHue(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)this;
            check_hresult(_winrt_abi_type->put_MinHue(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorSpectrum<D>::MaxHue() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxHue(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)this;
            check_hresult(_winrt_abi_type->get_MaxHue(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorSpectrum<D>::MaxHue(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxHue(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)this;
            check_hresult(_winrt_abi_type->put_MaxHue(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorSpectrum<D>::MinSaturation() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinSaturation(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)this;
            check_hresult(_winrt_abi_type->get_MinSaturation(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorSpectrum<D>::MinSaturation(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MinSaturation(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)this;
            check_hresult(_winrt_abi_type->put_MinSaturation(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorSpectrum<D>::MaxSaturation() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxSaturation(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)this;
            check_hresult(_winrt_abi_type->get_MaxSaturation(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorSpectrum<D>::MaxSaturation(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxSaturation(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)this;
            check_hresult(_winrt_abi_type->put_MaxSaturation(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorSpectrum<D>::MinValue() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinValue(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)this;
            check_hresult(_winrt_abi_type->get_MinValue(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorSpectrum<D>::MinValue(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MinValue(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)this;
            check_hresult(_winrt_abi_type->put_MinValue(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorSpectrum<D>::MaxValue() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxValue(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)this;
            check_hresult(_winrt_abi_type->get_MaxValue(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorSpectrum<D>::MaxValue(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxValue(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)this;
            check_hresult(_winrt_abi_type->put_MaxValue(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorSpectrum<D>::Shape() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ColorSpectrumShape value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Shape(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)this;
            check_hresult(_winrt_abi_type->get_Shape(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorSpectrum<D>::Shape(winrt::Microsoft::UI::Xaml::Controls::ColorSpectrumShape const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Shape(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)this;
            check_hresult(_winrt_abi_type->put_Shape(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorSpectrum<D>::Components() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ColorSpectrumComponents value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Components(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)this;
            check_hresult(_winrt_abi_type->get_Components(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorSpectrum<D>::Components(winrt::Microsoft::UI::Xaml::Controls::ColorSpectrumComponents const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Components(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)this;
            check_hresult(_winrt_abi_type->put_Components(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorSpectrum<D>::ColorChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::ColorSpectrum, 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::Primitives::IColorSpectrum>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)&_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::Primitives::IColorSpectrum>**)this;
            check_hresult(_winrt_abi_type->add_ColorChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorSpectrum<D>::ColorChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::ColorSpectrum, 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_Primitives_IColorSpectrum<D>::ColorChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>**)&_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::Primitives::IColorSpectrum>**)this;
            _winrt_abi_type->remove_ColorChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorSpectrumFactory<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::Primitives::IColorSpectrumFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumFactory>**)&_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::Primitives::IColorSpectrumFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::ColorSpectrum{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorSpectrumStatics<D>::ColorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ColorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>**)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_Primitives_IColorSpectrumStatics<D>::HsvColorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HsvColorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>**)this;
            check_hresult(_winrt_abi_type->get_HsvColorProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorSpectrumStatics<D>::MinHueProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinHueProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>**)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_Primitives_IColorSpectrumStatics<D>::MaxHueProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxHueProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>**)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_Primitives_IColorSpectrumStatics<D>::MinSaturationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinSaturationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>**)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_Primitives_IColorSpectrumStatics<D>::MaxSaturationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxSaturationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>**)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_Primitives_IColorSpectrumStatics<D>::MinValueProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinValueProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>**)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_Primitives_IColorSpectrumStatics<D>::MaxValueProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxValueProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>**)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_Primitives_IColorSpectrumStatics<D>::ShapeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ShapeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>**)this;
            check_hresult(_winrt_abi_type->get_ShapeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColorSpectrumStatics<D>::ComponentsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ComponentsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>**)this;
            check_hresult(_winrt_abi_type->get_ComponentsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColumnMajorUniformToLargestGridLayout<D>::MaxColumns() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxColumns(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayout>**)this;
            check_hresult(_winrt_abi_type->get_MaxColumns(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColumnMajorUniformToLargestGridLayout<D>::MaxColumns(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxColumns(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayout>**)this;
            check_hresult(_winrt_abi_type->put_MaxColumns(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColumnMajorUniformToLargestGridLayout<D>::ColumnSpacing() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ColumnSpacing(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayout>**)this;
            check_hresult(_winrt_abi_type->get_ColumnSpacing(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColumnMajorUniformToLargestGridLayout<D>::ColumnSpacing(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ColumnSpacing(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayout>**)this;
            check_hresult(_winrt_abi_type->put_ColumnSpacing(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColumnMajorUniformToLargestGridLayout<D>::RowSpacing() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RowSpacing(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayout>**)this;
            check_hresult(_winrt_abi_type->get_RowSpacing(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColumnMajorUniformToLargestGridLayout<D>::RowSpacing(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayout>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayout, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayout>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_RowSpacing(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayout>**)this;
            check_hresult(_winrt_abi_type->put_RowSpacing(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColumnMajorUniformToLargestGridLayoutFactory<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::Primitives::IColumnMajorUniformToLargestGridLayoutFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayoutFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayoutFactory>**)&_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::Primitives::IColumnMajorUniformToLargestGridLayoutFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::ColumnMajorUniformToLargestGridLayout{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IColumnMajorUniformToLargestGridLayoutStatics<D>::MaxColumnsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxColumnsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayoutStatics>**)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_Primitives_IColumnMajorUniformToLargestGridLayoutStatics<D>::ColumnSpacingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ColumnSpacingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayoutStatics>**)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_Primitives_IColumnMajorUniformToLargestGridLayoutStatics<D>::RowSpacingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayoutStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayoutStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayoutStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RowSpacingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayoutStatics>**)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_Primitives_IComboBoxHelperStatics<D>::KeepInteriorCornersSquareProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxHelperStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxHelperStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxHelperStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_KeepInteriorCornersSquareProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxHelperStatics>**)this;
            check_hresult(_winrt_abi_type->get_KeepInteriorCornersSquareProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IComboBoxHelperStatics<D>::SetKeepInteriorCornersSquare(winrt::Microsoft::UI::Xaml::Controls::ComboBox const& comboBox, bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxHelperStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxHelperStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxHelperStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetKeepInteriorCornersSquare(*(void**)(&comboBox), value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxHelperStatics>**)this;
            check_hresult(_winrt_abi_type->SetKeepInteriorCornersSquare(*(void**)(&comboBox), value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IComboBoxHelperStatics<D>::GetKeepInteriorCornersSquare(winrt::Microsoft::UI::Xaml::Controls::ComboBox const& comboBox) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxHelperStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxHelperStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxHelperStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetKeepInteriorCornersSquare(*(void**)(&comboBox), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxHelperStatics>**)this;
            check_hresult(_winrt_abi_type->GetKeepInteriorCornersSquare(*(void**)(&comboBox), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IComboBoxTemplateSettings<D>::DropDownOpenedHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DropDownOpenedHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_DropDownOpenedHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IComboBoxTemplateSettings<D>::DropDownClosedHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DropDownClosedHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_DropDownClosedHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IComboBoxTemplateSettings<D>::DropDownOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DropDownOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_DropDownOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IComboBoxTemplateSettings<D>::SelectedItemDirection() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Primitives::AnimationDirection value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItemDirection(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_SelectedItemDirection(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IComboBoxTemplateSettings<D>::DropDownContentMinWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DropDownContentMinWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_DropDownContentMinWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarFlyoutCommandBar<D>::FlyoutTemplateSettings() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FlyoutTemplateSettings(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBar>**)this;
            check_hresult(_winrt_abi_type->get_FlyoutTemplateSettings(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::CommandBarFlyoutCommandBarTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarFlyoutCommandBar2<D>::SystemBackdrop() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBar2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBar2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBar2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SystemBackdrop(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBar2>**)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_Primitives_ICommandBarFlyoutCommandBar2<D>::SystemBackdrop(winrt::Microsoft::UI::Xaml::Media::SystemBackdrop const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBar2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBar2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBar2>**)&_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::Primitives::ICommandBarFlyoutCommandBar2>**)this;
            check_hresult(_winrt_abi_type->put_SystemBackdrop(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarFlyoutCommandBarAutomationPropertiesStatics<D>::ControlTypeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarAutomationPropertiesStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarAutomationPropertiesStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarAutomationPropertiesStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ControlTypeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarAutomationPropertiesStatics>**)this;
            check_hresult(_winrt_abi_type->get_ControlTypeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarFlyoutCommandBarAutomationPropertiesStatics<D>::GetControlType(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        winrt::Microsoft::UI::Xaml::Automation::Peers::AutomationControlType result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarAutomationPropertiesStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarAutomationPropertiesStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarAutomationPropertiesStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetControlType(*(void**)(&element), reinterpret_cast<int32_t*>(&result)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarAutomationPropertiesStatics>**)this;
            check_hresult(_winrt_abi_type->GetControlType(*(void**)(&element), reinterpret_cast<int32_t*>(&result)));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarFlyoutCommandBarAutomationPropertiesStatics<D>::SetControlType(winrt::Microsoft::UI::Xaml::UIElement const& element, winrt::Microsoft::UI::Xaml::Automation::Peers::AutomationControlType const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarAutomationPropertiesStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarAutomationPropertiesStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarAutomationPropertiesStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetControlType(*(void**)(&element), static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarAutomationPropertiesStatics>**)this;
            check_hresult(_winrt_abi_type->SetControlType(*(void**)(&element), static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarFlyoutCommandBarFactory<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::Primitives::ICommandBarFlyoutCommandBarFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarFactory>**)&_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::Primitives::ICommandBarFlyoutCommandBarFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::CommandBarFlyoutCommandBar{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarFlyoutCommandBarStatics<D>::SystemBackdropProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SystemBackdropProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarStatics>**)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_Primitives_ICommandBarFlyoutCommandBarTemplateSettings<D>::OpenAnimationStartPosition() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OpenAnimationStartPosition(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_OpenAnimationStartPosition(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarFlyoutCommandBarTemplateSettings<D>::OpenAnimationEndPosition() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OpenAnimationEndPosition(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_OpenAnimationEndPosition(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarFlyoutCommandBarTemplateSettings<D>::CloseAnimationEndPosition() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CloseAnimationEndPosition(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_CloseAnimationEndPosition(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarFlyoutCommandBarTemplateSettings<D>::CurrentWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CurrentWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_CurrentWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarFlyoutCommandBarTemplateSettings<D>::ExpandedWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExpandedWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_ExpandedWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarFlyoutCommandBarTemplateSettings<D>::WidthExpansionDelta() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_WidthExpansionDelta(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_WidthExpansionDelta(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarFlyoutCommandBarTemplateSettings<D>::WidthExpansionAnimationStartPosition() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_WidthExpansionAnimationStartPosition(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_WidthExpansionAnimationStartPosition(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarFlyoutCommandBarTemplateSettings<D>::WidthExpansionAnimationEndPosition() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_WidthExpansionAnimationEndPosition(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_WidthExpansionAnimationEndPosition(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarFlyoutCommandBarTemplateSettings<D>::WidthExpansionMoreButtonAnimationStartPosition() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_WidthExpansionMoreButtonAnimationStartPosition(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_WidthExpansionMoreButtonAnimationStartPosition(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarFlyoutCommandBarTemplateSettings<D>::WidthExpansionMoreButtonAnimationEndPosition() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_WidthExpansionMoreButtonAnimationEndPosition(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_WidthExpansionMoreButtonAnimationEndPosition(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarFlyoutCommandBarTemplateSettings<D>::ExpandUpOverflowVerticalPosition() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExpandUpOverflowVerticalPosition(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_ExpandUpOverflowVerticalPosition(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarFlyoutCommandBarTemplateSettings<D>::ExpandDownOverflowVerticalPosition() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExpandDownOverflowVerticalPosition(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_ExpandDownOverflowVerticalPosition(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarFlyoutCommandBarTemplateSettings<D>::ExpandUpAnimationStartPosition() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExpandUpAnimationStartPosition(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_ExpandUpAnimationStartPosition(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarFlyoutCommandBarTemplateSettings<D>::ExpandUpAnimationEndPosition() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExpandUpAnimationEndPosition(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_ExpandUpAnimationEndPosition(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarFlyoutCommandBarTemplateSettings<D>::ExpandUpAnimationHoldPosition() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExpandUpAnimationHoldPosition(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_ExpandUpAnimationHoldPosition(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarFlyoutCommandBarTemplateSettings<D>::ExpandDownAnimationStartPosition() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExpandDownAnimationStartPosition(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_ExpandDownAnimationStartPosition(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarFlyoutCommandBarTemplateSettings<D>::ExpandDownAnimationEndPosition() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExpandDownAnimationEndPosition(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_ExpandDownAnimationEndPosition(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarFlyoutCommandBarTemplateSettings<D>::ExpandDownAnimationHoldPosition() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExpandDownAnimationHoldPosition(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_ExpandDownAnimationHoldPosition(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarFlyoutCommandBarTemplateSettings<D>::ContentClipRect() const
    {
        winrt::Windows::Foundation::Rect value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentClipRect(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_ContentClipRect(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarFlyoutCommandBarTemplateSettings<D>::OverflowContentClipRect() const
    {
        winrt::Windows::Foundation::Rect value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OverflowContentClipRect(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_OverflowContentClipRect(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarTemplateSettings<D>::ContentHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_ContentHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarTemplateSettings<D>::OverflowContentClipRect() const
    {
        winrt::Windows::Foundation::Rect value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OverflowContentClipRect(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_OverflowContentClipRect(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarTemplateSettings<D>::OverflowContentMinWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OverflowContentMinWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_OverflowContentMinWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarTemplateSettings<D>::OverflowContentMaxWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OverflowContentMaxWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_OverflowContentMaxWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarTemplateSettings<D>::OverflowContentMaxHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OverflowContentMaxHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_OverflowContentMaxHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarTemplateSettings<D>::OverflowContentHorizontalOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OverflowContentHorizontalOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_OverflowContentHorizontalOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarTemplateSettings<D>::OverflowContentHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OverflowContentHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_OverflowContentHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarTemplateSettings<D>::NegativeOverflowContentHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NegativeOverflowContentHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_NegativeOverflowContentHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarTemplateSettings<D>::EffectiveOverflowButtonVisibility() const
    {
        winrt::Microsoft::UI::Xaml::Visibility value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_EffectiveOverflowButtonVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_EffectiveOverflowButtonVisibility(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarTemplateSettings<D>::OverflowContentCompactYTranslation() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OverflowContentCompactYTranslation(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_OverflowContentCompactYTranslation(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarTemplateSettings<D>::OverflowContentMinimalYTranslation() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OverflowContentMinimalYTranslation(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_OverflowContentMinimalYTranslation(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICommandBarTemplateSettings<D>::OverflowContentHiddenYTranslation() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OverflowContentHiddenYTranslation(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_OverflowContentHiddenYTranslation(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICornerRadiusFilterConverter<D>::Filter() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Primitives::CornerRadiusFilterKind value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Filter(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverter>**)this;
            check_hresult(_winrt_abi_type->get_Filter(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICornerRadiusFilterConverter<D>::Filter(winrt::Microsoft::UI::Xaml::Controls::Primitives::CornerRadiusFilterKind const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Filter(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverter>**)this;
            check_hresult(_winrt_abi_type->put_Filter(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICornerRadiusFilterConverter<D>::Scale() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Scale(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverter>**)this;
            check_hresult(_winrt_abi_type->get_Scale(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICornerRadiusFilterConverter<D>::Scale(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Scale(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverter>**)this;
            check_hresult(_winrt_abi_type->put_Scale(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICornerRadiusFilterConverterStatics<D>::FilterProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FilterProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverterStatics>**)this;
            check_hresult(_winrt_abi_type->get_FilterProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICornerRadiusFilterConverterStatics<D>::ScaleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ScaleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverterStatics>**)this;
            check_hresult(_winrt_abi_type->get_ScaleProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICornerRadiusToThicknessConverter<D>::ConversionKind() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Primitives::CornerRadiusToThicknessConverterKind value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ConversionKind(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverter>**)this;
            check_hresult(_winrt_abi_type->get_ConversionKind(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICornerRadiusToThicknessConverter<D>::ConversionKind(winrt::Microsoft::UI::Xaml::Controls::Primitives::CornerRadiusToThicknessConverterKind const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ConversionKind(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverter>**)this;
            check_hresult(_winrt_abi_type->put_ConversionKind(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICornerRadiusToThicknessConverter<D>::Multiplier() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Multiplier(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverter>**)this;
            check_hresult(_winrt_abi_type->get_Multiplier(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICornerRadiusToThicknessConverter<D>::Multiplier(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Multiplier(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverter>**)this;
            check_hresult(_winrt_abi_type->put_Multiplier(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICornerRadiusToThicknessConverterStatics<D>::ConversionKindProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ConversionKindProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverterStatics>**)this;
            check_hresult(_winrt_abi_type->get_ConversionKindProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ICornerRadiusToThicknessConverterStatics<D>::MultiplierProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MultiplierProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverterStatics>**)this;
            check_hresult(_winrt_abi_type->get_MultiplierProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IDragCompletedEventArgs<D>::HorizontalChange() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragCompletedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragCompletedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragCompletedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalChange(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragCompletedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalChange(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IDragCompletedEventArgs<D>::VerticalChange() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragCompletedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragCompletedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragCompletedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalChange(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragCompletedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_VerticalChange(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IDragCompletedEventArgs<D>::Canceled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragCompletedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragCompletedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragCompletedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Canceled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragCompletedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Canceled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IDragCompletedEventArgsFactory<D>::CreateInstanceWithHorizontalChangeVerticalChangeAndCanceled(double horizontalChange, double verticalChange, bool canceled, 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::Primitives::IDragCompletedEventArgsFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragCompletedEventArgsFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragCompletedEventArgsFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstanceWithHorizontalChangeVerticalChangeAndCanceled(horizontalChange, verticalChange, canceled, *(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragCompletedEventArgsFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstanceWithHorizontalChangeVerticalChangeAndCanceled(horizontalChange, verticalChange, canceled, *(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::DragCompletedEventArgs{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IDragDeltaEventArgs<D>::HorizontalChange() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragDeltaEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragDeltaEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragDeltaEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalChange(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragDeltaEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalChange(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IDragDeltaEventArgs<D>::VerticalChange() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragDeltaEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragDeltaEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragDeltaEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalChange(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragDeltaEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_VerticalChange(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IDragDeltaEventArgsFactory<D>::CreateInstanceWithHorizontalChangeAndVerticalChange(double horizontalChange, double verticalChange, 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::Primitives::IDragDeltaEventArgsFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragDeltaEventArgsFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragDeltaEventArgsFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstanceWithHorizontalChangeAndVerticalChange(horizontalChange, verticalChange, *(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragDeltaEventArgsFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstanceWithHorizontalChangeAndVerticalChange(horizontalChange, verticalChange, *(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::DragDeltaEventArgs{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IDragStartedEventArgs<D>::HorizontalOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragStartedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragStartedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragStartedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragStartedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IDragStartedEventArgs<D>::VerticalOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragStartedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragStartedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragStartedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragStartedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_VerticalOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IDragStartedEventArgsFactory<D>::CreateInstanceWithHorizontalOffsetAndVerticalOffset(double horizontalOffset, double verticalOffset, 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::Primitives::IDragStartedEventArgsFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragStartedEventArgsFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragStartedEventArgsFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstanceWithHorizontalOffsetAndVerticalOffset(horizontalOffset, verticalOffset, *(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragStartedEventArgsFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstanceWithHorizontalOffsetAndVerticalOffset(horizontalOffset, verticalOffset, *(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::DragStartedEventArgs{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::Placement() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutPlacementMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_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::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->get_Placement(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::Placement(winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutPlacementMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_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::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->put_Placement(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::Target() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Target(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)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_Primitives_IFlyoutBase<D>::AllowFocusOnInteraction() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AllowFocusOnInteraction(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->get_AllowFocusOnInteraction(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::AllowFocusOnInteraction(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_AllowFocusOnInteraction(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->put_AllowFocusOnInteraction(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::LightDismissOverlayMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_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::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::LightDismissOverlayMode(winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_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::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->put_LightDismissOverlayMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::AllowFocusWhenDisabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AllowFocusWhenDisabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->get_AllowFocusWhenDisabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::AllowFocusWhenDisabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_AllowFocusWhenDisabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->put_AllowFocusWhenDisabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::ShowMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutShowMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ShowMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->get_ShowMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::ShowMode(winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutShowMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ShowMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->put_ShowMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::InputDevicePrefersPrimaryCommands() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InputDevicePrefersPrimaryCommands(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->get_InputDevicePrefersPrimaryCommands(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::AreOpenCloseAnimationsEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AreOpenCloseAnimationsEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->get_AreOpenCloseAnimationsEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::AreOpenCloseAnimationsEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_AreOpenCloseAnimationsEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->put_AreOpenCloseAnimationsEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::ShouldConstrainToRootBounds() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ShouldConstrainToRootBounds(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->get_ShouldConstrainToRootBounds(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::ShouldConstrainToRootBounds(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ShouldConstrainToRootBounds(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->put_ShouldConstrainToRootBounds(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::IsConstrainedToRootBounds() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsConstrainedToRootBounds(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->get_IsConstrainedToRootBounds(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::ElementSoundMode() const
    {
        winrt::Microsoft::UI::Xaml::ElementSoundMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_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::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->get_ElementSoundMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::ElementSoundMode(winrt::Microsoft::UI::Xaml::ElementSoundMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_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::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->put_ElementSoundMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::OverlayInputPassThroughElement() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OverlayInputPassThroughElement(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->get_OverlayInputPassThroughElement(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyObject{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::OverlayInputPassThroughElement(winrt::Microsoft::UI::Xaml::DependencyObject const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_OverlayInputPassThroughElement(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->put_OverlayInputPassThroughElement(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::IsOpen() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsOpen(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->get_IsOpen(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::XamlRoot() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_XamlRoot(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->get_XamlRoot(&value));
        }
        return winrt::Microsoft::UI::Xaml::XamlRoot{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::XamlRoot(winrt::Microsoft::UI::Xaml::XamlRoot const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_XamlRoot(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->put_XamlRoot(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<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::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_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::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->add_Opened(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<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_Primitives_IFlyoutBase<D>::Opened(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_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::Primitives::IFlyoutBase>**)this;
            _winrt_abi_type->remove_Opened(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<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::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_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::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->add_Closed(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<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_Primitives_IFlyoutBase<D>::Closed(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_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::Primitives::IFlyoutBase>**)this;
            _winrt_abi_type->remove_Closed(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<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::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_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::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->add_Opening(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<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_Primitives_IFlyoutBase<D>::Opening(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_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::Primitives::IFlyoutBase>**)this;
            _winrt_abi_type->remove_Opening(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::Closing(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase, winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBaseClosingEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_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::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->add_Closing(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::Closing(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase, winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBaseClosingEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, Closing_revoker>(this, Closing(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::Closing(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_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::Primitives::IFlyoutBase>**)this;
            _winrt_abi_type->remove_Closing(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::ShowAt(winrt::Microsoft::UI::Xaml::FrameworkElement const& placementTarget) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ShowAt(*(void**)(&placementTarget)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->ShowAt(*(void**)(&placementTarget)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::ShowAt(winrt::Microsoft::UI::Xaml::DependencyObject const& placementTarget, winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutShowOptions const& showOptions) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ShowAtWithOptions(*(void**)(&placementTarget), *(void**)(&showOptions)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->ShowAtWithOptions(*(void**)(&placementTarget), *(void**)(&showOptions)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::Hide() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->Hide());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->Hide());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase<D>::TryInvokeKeyboardAccelerator(winrt::Microsoft::UI::Xaml::Input::ProcessKeyboardAcceleratorEventArgs const& args) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->TryInvokeKeyboardAccelerator(*(void**)(&args)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>**)this;
            check_hresult(_winrt_abi_type->TryInvokeKeyboardAccelerator(*(void**)(&args)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBase2<D>::SystemBackdrop() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SystemBackdrop(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase2>**)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_Primitives_IFlyoutBase2<D>::SystemBackdrop(winrt::Microsoft::UI::Xaml::Media::SystemBackdrop const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase2>**)&_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::Primitives::IFlyoutBase2>**)this;
            check_hresult(_winrt_abi_type->put_SystemBackdrop(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBaseClosingEventArgs<D>::Cancel() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseClosingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseClosingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseClosingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseClosingEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Cancel(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBaseClosingEventArgs<D>::Cancel(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseClosingEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseClosingEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseClosingEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseClosingEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Cancel(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBaseFactory<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::Primitives::IFlyoutBaseFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseFactory>**)&_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::Primitives::IFlyoutBaseFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBaseOverrides<D>::CreatePresenter() const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreatePresenter(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverrides>**)this;
            check_hresult(_winrt_abi_type->CreatePresenter(&result));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Control{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBaseOverrides<D>::OnProcessKeyboardAccelerators(winrt::Microsoft::UI::Xaml::Input::ProcessKeyboardAcceleratorEventArgs const& args) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnProcessKeyboardAccelerators(*(void**)(&args)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverrides>**)this;
            check_hresult(_winrt_abi_type->OnProcessKeyboardAccelerators(*(void**)(&args)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBaseStatics<D>::TargetProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TargetProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)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_Primitives_IFlyoutBaseStatics<D>::PlacementProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlacementProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)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_Primitives_IFlyoutBaseStatics<D>::AllowFocusOnInteractionProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AllowFocusOnInteractionProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_AllowFocusOnInteractionProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBaseStatics<D>::LightDismissOverlayModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)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_Primitives_IFlyoutBaseStatics<D>::AllowFocusWhenDisabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AllowFocusWhenDisabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_AllowFocusWhenDisabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBaseStatics<D>::ShowModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ShowModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_ShowModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBaseStatics<D>::InputDevicePrefersPrimaryCommandsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InputDevicePrefersPrimaryCommandsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_InputDevicePrefersPrimaryCommandsProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBaseStatics<D>::AreOpenCloseAnimationsEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AreOpenCloseAnimationsEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_AreOpenCloseAnimationsEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBaseStatics<D>::ShouldConstrainToRootBoundsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ShouldConstrainToRootBoundsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)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_Primitives_IFlyoutBaseStatics<D>::ElementSoundModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ElementSoundModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)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_Primitives_IFlyoutBaseStatics<D>::OverlayInputPassThroughElementProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OverlayInputPassThroughElementProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_OverlayInputPassThroughElementProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBaseStatics<D>::IsOpenProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsOpenProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)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_Primitives_IFlyoutBaseStatics<D>::AttachedFlyoutProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AttachedFlyoutProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)this;
            check_hresult(_winrt_abi_type->get_AttachedFlyoutProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBaseStatics<D>::GetAttachedFlyout(winrt::Microsoft::UI::Xaml::FrameworkElement const& element) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetAttachedFlyout(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)this;
            check_hresult(_winrt_abi_type->GetAttachedFlyout(*(void**)(&element), &result));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBaseStatics<D>::SetAttachedFlyout(winrt::Microsoft::UI::Xaml::FrameworkElement const& element, winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetAttachedFlyout(*(void**)(&element), *(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)this;
            check_hresult(_winrt_abi_type->SetAttachedFlyout(*(void**)(&element), *(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBaseStatics<D>::ShowAttachedFlyout(winrt::Microsoft::UI::Xaml::FrameworkElement const& flyoutOwner) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ShowAttachedFlyout(*(void**)(&flyoutOwner)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>**)this;
            check_hresult(_winrt_abi_type->ShowAttachedFlyout(*(void**)(&flyoutOwner)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutBaseStatics2<D>::SystemBackdropProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SystemBackdropProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics2>**)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_Primitives_IFlyoutShowOptions<D>::Position() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Position(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions>**)this;
            check_hresult(_winrt_abi_type->get_Position(&value));
        }
        return winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::Point>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutShowOptions<D>::Position(winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::Point> const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Position(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions>**)this;
            check_hresult(_winrt_abi_type->put_Position(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutShowOptions<D>::ExclusionRect() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExclusionRect(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions>**)this;
            check_hresult(_winrt_abi_type->get_ExclusionRect(&value));
        }
        return winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::Rect>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutShowOptions<D>::ExclusionRect(winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::Rect> const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ExclusionRect(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions>**)this;
            check_hresult(_winrt_abi_type->put_ExclusionRect(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutShowOptions<D>::ShowMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutShowMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ShowMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions>**)this;
            check_hresult(_winrt_abi_type->get_ShowMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutShowOptions<D>::ShowMode(winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutShowMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ShowMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions>**)this;
            check_hresult(_winrt_abi_type->put_ShowMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutShowOptions<D>::Placement() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutPlacementMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions>**)&_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::Primitives::IFlyoutShowOptions>**)this;
            check_hresult(_winrt_abi_type->get_Placement(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutShowOptions<D>::Placement(winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutPlacementMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions>**)&_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::Primitives::IFlyoutShowOptions>**)this;
            check_hresult(_winrt_abi_type->put_Placement(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IFlyoutShowOptionsFactory<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::Primitives::IFlyoutShowOptionsFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptionsFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptionsFactory>**)&_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::Primitives::IFlyoutShowOptionsFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutShowOptions{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGeneratorPositionHelperStatics<D>::FromIndexAndOffset(int32_t index, int32_t offset) const
    {
        winrt::Microsoft::UI::Xaml::Controls::Primitives::GeneratorPosition result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGeneratorPositionHelperStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGeneratorPositionHelperStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGeneratorPositionHelperStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->FromIndexAndOffset(index, offset, put_abi(result)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGeneratorPositionHelperStatics>**)this;
            check_hresult(_winrt_abi_type->FromIndexAndOffset(index, offset, put_abi(result)));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::SelectionCheckMarkVisualEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionCheckMarkVisualEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_SelectionCheckMarkVisualEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::SelectionCheckMarkVisualEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionCheckMarkVisualEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_SelectionCheckMarkVisualEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::CheckHintBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckHintBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_CheckHintBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::CheckHintBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CheckHintBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_CheckHintBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::CheckSelectingBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckSelectingBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_CheckSelectingBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::CheckSelectingBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CheckSelectingBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_CheckSelectingBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::CheckBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_CheckBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::CheckBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CheckBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_CheckBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::DragBackground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DragBackground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_DragBackground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::DragBackground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DragBackground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_DragBackground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::DragForeground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DragForeground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_DragForeground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::DragForeground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DragForeground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_DragForeground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::FocusBorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FocusBorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)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_Primitives_IGridViewItemPresenter<D>::FocusBorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_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::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_FocusBorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::PlaceholderBackground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaceholderBackground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_PlaceholderBackground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::PlaceholderBackground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PlaceholderBackground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_PlaceholderBackground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::PointerOverBackground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PointerOverBackground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_PointerOverBackground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::PointerOverBackground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PointerOverBackground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_PointerOverBackground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::SelectedBackground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedBackground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_SelectedBackground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::SelectedBackground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedBackground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_SelectedBackground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::SelectedForeground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedForeground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)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_Primitives_IGridViewItemPresenter<D>::SelectedForeground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_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::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_SelectedForeground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::SelectedPointerOverBackground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedPointerOverBackground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_SelectedPointerOverBackground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::SelectedPointerOverBackground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedPointerOverBackground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_SelectedPointerOverBackground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::SelectedPointerOverBorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedPointerOverBorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_SelectedPointerOverBorderBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::SelectedPointerOverBorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedPointerOverBorderBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_SelectedPointerOverBorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::SelectedBorderThickness() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedBorderThickness(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_SelectedBorderThickness(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::SelectedBorderThickness(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedBorderThickness(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_SelectedBorderThickness(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::DisabledOpacity() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DisabledOpacity(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_DisabledOpacity(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::DisabledOpacity(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DisabledOpacity(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_DisabledOpacity(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::DragOpacity() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DragOpacity(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_DragOpacity(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::DragOpacity(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DragOpacity(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_DragOpacity(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::ReorderHintOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ReorderHintOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_ReorderHintOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::ReorderHintOffset(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ReorderHintOffset(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_ReorderHintOffset(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::GridViewItemPresenterHorizontalContentAlignment() const
    {
        winrt::Microsoft::UI::Xaml::HorizontalAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GridViewItemPresenterHorizontalContentAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_GridViewItemPresenterHorizontalContentAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::GridViewItemPresenterHorizontalContentAlignment(winrt::Microsoft::UI::Xaml::HorizontalAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_GridViewItemPresenterHorizontalContentAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_GridViewItemPresenterHorizontalContentAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::GridViewItemPresenterVerticalContentAlignment() const
    {
        winrt::Microsoft::UI::Xaml::VerticalAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GridViewItemPresenterVerticalContentAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_GridViewItemPresenterVerticalContentAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::GridViewItemPresenterVerticalContentAlignment(winrt::Microsoft::UI::Xaml::VerticalAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_GridViewItemPresenterVerticalContentAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_GridViewItemPresenterVerticalContentAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::GridViewItemPresenterPadding() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GridViewItemPresenterPadding(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_GridViewItemPresenterPadding(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::GridViewItemPresenterPadding(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_GridViewItemPresenterPadding(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_GridViewItemPresenterPadding(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::PointerOverBackgroundMargin() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PointerOverBackgroundMargin(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_PointerOverBackgroundMargin(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::PointerOverBackgroundMargin(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PointerOverBackgroundMargin(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_PointerOverBackgroundMargin(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::ContentMargin() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentMargin(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_ContentMargin(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenter<D>::ContentMargin(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ContentMargin(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_ContentMargin(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenterFactory<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::Primitives::IGridViewItemPresenterFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterFactory>**)&_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::Primitives::IGridViewItemPresenterFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::GridViewItemPresenter{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenterStatics<D>::SelectionCheckMarkVisualEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionCheckMarkVisualEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionCheckMarkVisualEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenterStatics<D>::CheckHintBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckHintBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_CheckHintBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenterStatics<D>::CheckSelectingBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckSelectingBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_CheckSelectingBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenterStatics<D>::CheckBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_CheckBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenterStatics<D>::DragBackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DragBackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_DragBackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenterStatics<D>::DragForegroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DragForegroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_DragForegroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenterStatics<D>::FocusBorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FocusBorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)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_Primitives_IGridViewItemPresenterStatics<D>::PlaceholderBackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaceholderBackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_PlaceholderBackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenterStatics<D>::PointerOverBackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PointerOverBackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_PointerOverBackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenterStatics<D>::SelectedBackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedBackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedBackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenterStatics<D>::SelectedForegroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedForegroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)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_Primitives_IGridViewItemPresenterStatics<D>::SelectedPointerOverBackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedPointerOverBackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedPointerOverBackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenterStatics<D>::SelectedPointerOverBorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedPointerOverBorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedPointerOverBorderBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenterStatics<D>::SelectedBorderThicknessProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedBorderThicknessProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedBorderThicknessProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenterStatics<D>::DisabledOpacityProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DisabledOpacityProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_DisabledOpacityProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenterStatics<D>::DragOpacityProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DragOpacityProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_DragOpacityProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenterStatics<D>::ReorderHintOffsetProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ReorderHintOffsetProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_ReorderHintOffsetProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenterStatics<D>::GridViewItemPresenterHorizontalContentAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GridViewItemPresenterHorizontalContentAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_GridViewItemPresenterHorizontalContentAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenterStatics<D>::GridViewItemPresenterVerticalContentAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GridViewItemPresenterVerticalContentAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_GridViewItemPresenterVerticalContentAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenterStatics<D>::GridViewItemPresenterPaddingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_GridViewItemPresenterPaddingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_GridViewItemPresenterPaddingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenterStatics<D>::PointerOverBackgroundMarginProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PointerOverBackgroundMarginProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_PointerOverBackgroundMarginProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemPresenterStatics<D>::ContentMarginProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentMarginProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_ContentMarginProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IGridViewItemTemplateSettings<D>::DragItemsCount() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DragItemsCount(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_DragItemsCount(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IInfoBarPanel<D>::HorizontalOrientationPadding() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalOrientationPadding(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanel>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalOrientationPadding(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IInfoBarPanel<D>::HorizontalOrientationPadding(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalOrientationPadding(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanel>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalOrientationPadding(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IInfoBarPanel<D>::VerticalOrientationPadding() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalOrientationPadding(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanel>**)this;
            check_hresult(_winrt_abi_type->get_VerticalOrientationPadding(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IInfoBarPanel<D>::VerticalOrientationPadding(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalOrientationPadding(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanel>**)this;
            check_hresult(_winrt_abi_type->put_VerticalOrientationPadding(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IInfoBarPanelFactory<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::Primitives::IInfoBarPanelFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelFactory>**)&_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::Primitives::IInfoBarPanelFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::InfoBarPanel{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IInfoBarPanelStatics<D>::HorizontalOrientationPaddingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalOrientationPaddingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalOrientationPaddingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IInfoBarPanelStatics<D>::VerticalOrientationPaddingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalOrientationPaddingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_VerticalOrientationPaddingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IInfoBarPanelStatics<D>::SetHorizontalOrientationMargin(winrt::Microsoft::UI::Xaml::DependencyObject const& object, winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetHorizontalOrientationMargin(*(void**)(&object), impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics>**)this;
            check_hresult(_winrt_abi_type->SetHorizontalOrientationMargin(*(void**)(&object), impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IInfoBarPanelStatics<D>::GetHorizontalOrientationMargin(winrt::Microsoft::UI::Xaml::DependencyObject const& object) const
    {
        winrt::Microsoft::UI::Xaml::Thickness result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetHorizontalOrientationMargin(*(void**)(&object), put_abi(result)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics>**)this;
            check_hresult(_winrt_abi_type->GetHorizontalOrientationMargin(*(void**)(&object), put_abi(result)));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IInfoBarPanelStatics<D>::HorizontalOrientationMarginProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalOrientationMarginProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalOrientationMarginProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IInfoBarPanelStatics<D>::SetVerticalOrientationMargin(winrt::Microsoft::UI::Xaml::DependencyObject const& object, winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetVerticalOrientationMargin(*(void**)(&object), impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics>**)this;
            check_hresult(_winrt_abi_type->SetVerticalOrientationMargin(*(void**)(&object), impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IInfoBarPanelStatics<D>::GetVerticalOrientationMargin(winrt::Microsoft::UI::Xaml::DependencyObject const& object) const
    {
        winrt::Microsoft::UI::Xaml::Thickness result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetVerticalOrientationMargin(*(void**)(&object), put_abi(result)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics>**)this;
            check_hresult(_winrt_abi_type->GetVerticalOrientationMargin(*(void**)(&object), put_abi(result)));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IInfoBarPanelStatics<D>::VerticalOrientationMarginProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalOrientationMarginProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics>**)this;
            check_hresult(_winrt_abi_type->get_VerticalOrientationMarginProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IItemsChangedEventArgs<D>::Action() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IItemsChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IItemsChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IItemsChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Action(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IItemsChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Action(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IItemsChangedEventArgs<D>::Position() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Primitives::GeneratorPosition value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IItemsChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IItemsChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IItemsChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Position(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IItemsChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Position(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IItemsChangedEventArgs<D>::OldPosition() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Primitives::GeneratorPosition value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IItemsChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IItemsChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IItemsChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OldPosition(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IItemsChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_OldPosition(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IItemsChangedEventArgs<D>::ItemCount() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IItemsChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IItemsChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IItemsChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemCount(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IItemsChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_ItemCount(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IItemsChangedEventArgs<D>::ItemUICount() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IItemsChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IItemsChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IItemsChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemUICount(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IItemsChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_ItemUICount(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IJumpListItemBackgroundConverter<D>::Enabled() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Enabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverter>**)this;
            check_hresult(_winrt_abi_type->get_Enabled(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IJumpListItemBackgroundConverter<D>::Enabled(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Enabled(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverter>**)this;
            check_hresult(_winrt_abi_type->put_Enabled(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IJumpListItemBackgroundConverter<D>::Disabled() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Disabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverter>**)this;
            check_hresult(_winrt_abi_type->get_Disabled(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IJumpListItemBackgroundConverter<D>::Disabled(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Disabled(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverter>**)this;
            check_hresult(_winrt_abi_type->put_Disabled(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IJumpListItemBackgroundConverterStatics<D>::EnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_EnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverterStatics>**)this;
            check_hresult(_winrt_abi_type->get_EnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IJumpListItemBackgroundConverterStatics<D>::DisabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DisabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverterStatics>**)this;
            check_hresult(_winrt_abi_type->get_DisabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IJumpListItemForegroundConverter<D>::Enabled() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Enabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverter>**)this;
            check_hresult(_winrt_abi_type->get_Enabled(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IJumpListItemForegroundConverter<D>::Enabled(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Enabled(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverter>**)this;
            check_hresult(_winrt_abi_type->put_Enabled(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IJumpListItemForegroundConverter<D>::Disabled() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Disabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverter>**)this;
            check_hresult(_winrt_abi_type->get_Disabled(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IJumpListItemForegroundConverter<D>::Disabled(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Disabled(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverter>**)this;
            check_hresult(_winrt_abi_type->put_Disabled(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IJumpListItemForegroundConverterStatics<D>::EnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_EnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverterStatics>**)this;
            check_hresult(_winrt_abi_type->get_EnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IJumpListItemForegroundConverterStatics<D>::DisabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DisabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverterStatics>**)this;
            check_hresult(_winrt_abi_type->get_DisabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ILayoutInformationStatics<D>::GetLayoutExceptionElement(winrt::Windows::Foundation::IInspectable const& dispatcher) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILayoutInformationStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILayoutInformationStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILayoutInformationStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetLayoutExceptionElement(*(void**)(&dispatcher), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILayoutInformationStatics>**)this;
            check_hresult(_winrt_abi_type->GetLayoutExceptionElement(*(void**)(&dispatcher), &result));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ILayoutInformationStatics<D>::GetLayoutSlot(winrt::Microsoft::UI::Xaml::FrameworkElement const& element) const
    {
        winrt::Windows::Foundation::Rect result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILayoutInformationStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILayoutInformationStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILayoutInformationStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetLayoutSlot(*(void**)(&element), put_abi(result)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILayoutInformationStatics>**)this;
            check_hresult(_winrt_abi_type->GetLayoutSlot(*(void**)(&element), put_abi(result)));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ILayoutInformationStatics<D>::GetAvailableSize(winrt::Microsoft::UI::Xaml::UIElement const& element) const
    {
        winrt::Windows::Foundation::Size result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILayoutInformationStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILayoutInformationStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILayoutInformationStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetAvailableSize(*(void**)(&element), put_abi(result)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILayoutInformationStatics>**)this;
            check_hresult(_winrt_abi_type->GetAvailableSize(*(void**)(&element), put_abi(result)));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectionCheckMarkVisualEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionCheckMarkVisualEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_SelectionCheckMarkVisualEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectionCheckMarkVisualEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionCheckMarkVisualEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_SelectionCheckMarkVisualEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckHintBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckHintBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_CheckHintBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckHintBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CheckHintBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_CheckHintBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckSelectingBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckSelectingBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_CheckSelectingBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckSelectingBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CheckSelectingBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_CheckSelectingBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_CheckBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CheckBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_CheckBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::DragBackground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DragBackground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_DragBackground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::DragBackground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DragBackground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_DragBackground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::DragForeground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DragForeground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_DragForeground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::DragForeground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DragForeground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_DragForeground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::FocusBorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FocusBorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)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_Primitives_IListViewItemPresenter<D>::FocusBorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_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::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_FocusBorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::PlaceholderBackground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaceholderBackground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_PlaceholderBackground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::PlaceholderBackground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PlaceholderBackground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_PlaceholderBackground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::PointerOverBackground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PointerOverBackground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_PointerOverBackground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::PointerOverBackground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PointerOverBackground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_PointerOverBackground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectedBackground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedBackground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_SelectedBackground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectedBackground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedBackground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_SelectedBackground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectedForeground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedForeground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)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_Primitives_IListViewItemPresenter<D>::SelectedForeground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_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::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_SelectedForeground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectedPointerOverBackground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedPointerOverBackground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_SelectedPointerOverBackground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectedPointerOverBackground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedPointerOverBackground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_SelectedPointerOverBackground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectedPointerOverBorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedPointerOverBorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_SelectedPointerOverBorderBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectedPointerOverBorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedPointerOverBorderBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_SelectedPointerOverBorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectedBorderThickness() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedBorderThickness(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_SelectedBorderThickness(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectedBorderThickness(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedBorderThickness(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_SelectedBorderThickness(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::DisabledOpacity() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DisabledOpacity(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_DisabledOpacity(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::DisabledOpacity(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DisabledOpacity(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_DisabledOpacity(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::DragOpacity() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DragOpacity(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_DragOpacity(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::DragOpacity(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DragOpacity(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_DragOpacity(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::ReorderHintOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ReorderHintOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_ReorderHintOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::ReorderHintOffset(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ReorderHintOffset(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_ReorderHintOffset(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::ListViewItemPresenterHorizontalContentAlignment() const
    {
        winrt::Microsoft::UI::Xaml::HorizontalAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ListViewItemPresenterHorizontalContentAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_ListViewItemPresenterHorizontalContentAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::ListViewItemPresenterHorizontalContentAlignment(winrt::Microsoft::UI::Xaml::HorizontalAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ListViewItemPresenterHorizontalContentAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_ListViewItemPresenterHorizontalContentAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::ListViewItemPresenterVerticalContentAlignment() const
    {
        winrt::Microsoft::UI::Xaml::VerticalAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ListViewItemPresenterVerticalContentAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_ListViewItemPresenterVerticalContentAlignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::ListViewItemPresenterVerticalContentAlignment(winrt::Microsoft::UI::Xaml::VerticalAlignment const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ListViewItemPresenterVerticalContentAlignment(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_ListViewItemPresenterVerticalContentAlignment(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::ListViewItemPresenterPadding() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ListViewItemPresenterPadding(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_ListViewItemPresenterPadding(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::ListViewItemPresenterPadding(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ListViewItemPresenterPadding(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_ListViewItemPresenterPadding(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::PointerOverBackgroundMargin() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PointerOverBackgroundMargin(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_PointerOverBackgroundMargin(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::PointerOverBackgroundMargin(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PointerOverBackgroundMargin(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_PointerOverBackgroundMargin(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::ContentMargin() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentMargin(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_ContentMargin(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::ContentMargin(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ContentMargin(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_ContentMargin(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectedPressedBackground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedPressedBackground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_SelectedPressedBackground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectedPressedBackground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedPressedBackground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_SelectedPressedBackground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::PressedBackground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PressedBackground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_PressedBackground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::PressedBackground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PressedBackground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_PressedBackground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckBoxBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBoxBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_CheckBoxBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckBoxBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CheckBoxBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_CheckBoxBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::FocusSecondaryBorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FocusSecondaryBorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_FocusSecondaryBorderBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::FocusSecondaryBorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_FocusSecondaryBorderBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_FocusSecondaryBorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Primitives::ListViewItemPresenterCheckMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_CheckMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckMode(winrt::Microsoft::UI::Xaml::Controls::Primitives::ListViewItemPresenterCheckMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CheckMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_CheckMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::PointerOverForeground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PointerOverForeground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_PointerOverForeground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::PointerOverForeground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PointerOverForeground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_PointerOverForeground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::RevealBackground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RevealBackground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_RevealBackground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::RevealBackground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_RevealBackground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_RevealBackground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::RevealBorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RevealBorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_RevealBorderBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::RevealBorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_RevealBorderBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_RevealBorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::RevealBorderThickness() const
    {
        winrt::Microsoft::UI::Xaml::Thickness value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RevealBorderThickness(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_RevealBorderThickness(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::RevealBorderThickness(winrt::Microsoft::UI::Xaml::Thickness const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_RevealBorderThickness(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_RevealBorderThickness(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::RevealBackgroundShowsAboveContent() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RevealBackgroundShowsAboveContent(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_RevealBackgroundShowsAboveContent(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::RevealBackgroundShowsAboveContent(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_RevealBackgroundShowsAboveContent(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_RevealBackgroundShowsAboveContent(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectedDisabledBackground() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedDisabledBackground(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_SelectedDisabledBackground(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectedDisabledBackground(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedDisabledBackground(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_SelectedDisabledBackground(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckPressedBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckPressedBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_CheckPressedBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckPressedBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CheckPressedBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_CheckPressedBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckDisabledBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckDisabledBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_CheckDisabledBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckDisabledBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CheckDisabledBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_CheckDisabledBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckBoxPointerOverBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBoxPointerOverBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_CheckBoxPointerOverBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckBoxPointerOverBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CheckBoxPointerOverBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_CheckBoxPointerOverBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckBoxPressedBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBoxPressedBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_CheckBoxPressedBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckBoxPressedBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CheckBoxPressedBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_CheckBoxPressedBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckBoxDisabledBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBoxDisabledBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_CheckBoxDisabledBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckBoxDisabledBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CheckBoxDisabledBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_CheckBoxDisabledBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckBoxSelectedBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBoxSelectedBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_CheckBoxSelectedBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckBoxSelectedBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CheckBoxSelectedBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_CheckBoxSelectedBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckBoxSelectedPointerOverBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBoxSelectedPointerOverBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_CheckBoxSelectedPointerOverBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckBoxSelectedPointerOverBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CheckBoxSelectedPointerOverBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_CheckBoxSelectedPointerOverBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckBoxSelectedPressedBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBoxSelectedPressedBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_CheckBoxSelectedPressedBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckBoxSelectedPressedBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CheckBoxSelectedPressedBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_CheckBoxSelectedPressedBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckBoxSelectedDisabledBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBoxSelectedDisabledBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_CheckBoxSelectedDisabledBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckBoxSelectedDisabledBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CheckBoxSelectedDisabledBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_CheckBoxSelectedDisabledBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckBoxBorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBoxBorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_CheckBoxBorderBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckBoxBorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CheckBoxBorderBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_CheckBoxBorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckBoxPointerOverBorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBoxPointerOverBorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_CheckBoxPointerOverBorderBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckBoxPointerOverBorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CheckBoxPointerOverBorderBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_CheckBoxPointerOverBorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckBoxPressedBorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBoxPressedBorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_CheckBoxPressedBorderBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckBoxPressedBorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CheckBoxPressedBorderBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_CheckBoxPressedBorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckBoxDisabledBorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBoxDisabledBorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_CheckBoxDisabledBorderBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckBoxDisabledBorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CheckBoxDisabledBorderBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_CheckBoxDisabledBorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckBoxCornerRadius() const
    {
        winrt::Microsoft::UI::Xaml::CornerRadius value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBoxCornerRadius(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_CheckBoxCornerRadius(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::CheckBoxCornerRadius(winrt::Microsoft::UI::Xaml::CornerRadius const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CheckBoxCornerRadius(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_CheckBoxCornerRadius(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectionIndicatorCornerRadius() const
    {
        winrt::Microsoft::UI::Xaml::CornerRadius value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionIndicatorCornerRadius(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_SelectionIndicatorCornerRadius(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectionIndicatorCornerRadius(winrt::Microsoft::UI::Xaml::CornerRadius const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionIndicatorCornerRadius(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_SelectionIndicatorCornerRadius(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectionIndicatorVisualEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionIndicatorVisualEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_SelectionIndicatorVisualEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectionIndicatorVisualEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionIndicatorVisualEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_SelectionIndicatorVisualEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectionIndicatorMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Primitives::ListViewItemPresenterSelectionIndicatorMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionIndicatorMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_SelectionIndicatorMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectionIndicatorMode(winrt::Microsoft::UI::Xaml::Controls::Primitives::ListViewItemPresenterSelectionIndicatorMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionIndicatorMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_SelectionIndicatorMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectionIndicatorBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionIndicatorBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_SelectionIndicatorBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectionIndicatorBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionIndicatorBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_SelectionIndicatorBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectionIndicatorPointerOverBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionIndicatorPointerOverBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_SelectionIndicatorPointerOverBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectionIndicatorPointerOverBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionIndicatorPointerOverBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_SelectionIndicatorPointerOverBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectionIndicatorPressedBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionIndicatorPressedBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_SelectionIndicatorPressedBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectionIndicatorPressedBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionIndicatorPressedBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_SelectionIndicatorPressedBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectionIndicatorDisabledBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionIndicatorDisabledBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_SelectionIndicatorDisabledBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectionIndicatorDisabledBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectionIndicatorDisabledBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_SelectionIndicatorDisabledBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectedBorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedBorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)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_Primitives_IListViewItemPresenter<D>::SelectedBorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_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::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_SelectedBorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectedPressedBorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedPressedBorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)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_Primitives_IListViewItemPresenter<D>::SelectedPressedBorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_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::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_SelectedPressedBorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectedDisabledBorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedDisabledBorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)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_Primitives_IListViewItemPresenter<D>::SelectedDisabledBorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_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::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_SelectedDisabledBorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectedInnerBorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedInnerBorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_SelectedInnerBorderBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::SelectedInnerBorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedInnerBorderBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_SelectedInnerBorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::PointerOverBorderBrush() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PointerOverBorderBrush(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_PointerOverBorderBrush(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenter<D>::PointerOverBorderBrush(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_PointerOverBorderBrush(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_PointerOverBorderBrush(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterFactory<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::Primitives::IListViewItemPresenterFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterFactory>**)&_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::Primitives::IListViewItemPresenterFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::ListViewItemPresenter{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::SelectionCheckMarkVisualEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionCheckMarkVisualEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionCheckMarkVisualEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::CheckHintBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckHintBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_CheckHintBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::CheckSelectingBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckSelectingBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_CheckSelectingBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::CheckBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_CheckBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::DragBackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DragBackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_DragBackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::DragForegroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DragForegroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_DragForegroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::FocusBorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FocusBorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)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_Primitives_IListViewItemPresenterStatics<D>::PlaceholderBackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlaceholderBackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_PlaceholderBackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::PointerOverBackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PointerOverBackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_PointerOverBackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::SelectedBackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedBackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedBackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::SelectedForegroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedForegroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)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_Primitives_IListViewItemPresenterStatics<D>::SelectedPointerOverBackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedPointerOverBackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedPointerOverBackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::SelectedPointerOverBorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedPointerOverBorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedPointerOverBorderBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::SelectedBorderThicknessProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedBorderThicknessProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedBorderThicknessProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::DisabledOpacityProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DisabledOpacityProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_DisabledOpacityProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::DragOpacityProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DragOpacityProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_DragOpacityProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::ReorderHintOffsetProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ReorderHintOffsetProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_ReorderHintOffsetProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::ListViewItemPresenterHorizontalContentAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ListViewItemPresenterHorizontalContentAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_ListViewItemPresenterHorizontalContentAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::ListViewItemPresenterVerticalContentAlignmentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ListViewItemPresenterVerticalContentAlignmentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_ListViewItemPresenterVerticalContentAlignmentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::ListViewItemPresenterPaddingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ListViewItemPresenterPaddingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_ListViewItemPresenterPaddingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::PointerOverBackgroundMarginProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PointerOverBackgroundMarginProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_PointerOverBackgroundMarginProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::ContentMarginProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentMarginProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_ContentMarginProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::SelectedPressedBackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedPressedBackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedPressedBackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::PressedBackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PressedBackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_PressedBackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::CheckBoxBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBoxBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_CheckBoxBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::FocusSecondaryBorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FocusSecondaryBorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_FocusSecondaryBorderBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::CheckModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_CheckModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::PointerOverForegroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PointerOverForegroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_PointerOverForegroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::RevealBackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RevealBackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_RevealBackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::RevealBorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RevealBorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_RevealBorderBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::RevealBorderThicknessProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RevealBorderThicknessProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_RevealBorderThicknessProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::RevealBackgroundShowsAboveContentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_RevealBackgroundShowsAboveContentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_RevealBackgroundShowsAboveContentProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::SelectedDisabledBackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedDisabledBackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedDisabledBackgroundProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::CheckPressedBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckPressedBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_CheckPressedBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::CheckDisabledBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckDisabledBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_CheckDisabledBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::CheckBoxPointerOverBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBoxPointerOverBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_CheckBoxPointerOverBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::CheckBoxPressedBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBoxPressedBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_CheckBoxPressedBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::CheckBoxDisabledBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBoxDisabledBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_CheckBoxDisabledBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::CheckBoxSelectedBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBoxSelectedBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_CheckBoxSelectedBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::CheckBoxSelectedPointerOverBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBoxSelectedPointerOverBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_CheckBoxSelectedPointerOverBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::CheckBoxSelectedPressedBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBoxSelectedPressedBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_CheckBoxSelectedPressedBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::CheckBoxSelectedDisabledBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBoxSelectedDisabledBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_CheckBoxSelectedDisabledBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::CheckBoxBorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBoxBorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_CheckBoxBorderBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::CheckBoxPointerOverBorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBoxPointerOverBorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_CheckBoxPointerOverBorderBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::CheckBoxPressedBorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBoxPressedBorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_CheckBoxPressedBorderBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::CheckBoxDisabledBorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBoxDisabledBorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_CheckBoxDisabledBorderBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::CheckBoxCornerRadiusProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CheckBoxCornerRadiusProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_CheckBoxCornerRadiusProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::SelectionIndicatorCornerRadiusProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionIndicatorCornerRadiusProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionIndicatorCornerRadiusProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::SelectionIndicatorVisualEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionIndicatorVisualEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionIndicatorVisualEnabledProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::SelectionIndicatorModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionIndicatorModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionIndicatorModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::SelectionIndicatorBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionIndicatorBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionIndicatorBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::SelectionIndicatorPointerOverBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionIndicatorPointerOverBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionIndicatorPointerOverBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::SelectionIndicatorPressedBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionIndicatorPressedBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionIndicatorPressedBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::SelectionIndicatorDisabledBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectionIndicatorDisabledBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectionIndicatorDisabledBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::SelectedBorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedBorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)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_Primitives_IListViewItemPresenterStatics<D>::SelectedPressedBorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedPressedBorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)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_Primitives_IListViewItemPresenterStatics<D>::SelectedDisabledBorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedDisabledBorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)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_Primitives_IListViewItemPresenterStatics<D>::SelectedInnerBorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedInnerBorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_SelectedInnerBorderBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemPresenterStatics<D>::PointerOverBorderBrushProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PointerOverBorderBrushProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_PointerOverBorderBrushProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IListViewItemTemplateSettings<D>::DragItemsCount() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DragItemsCount(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_DragItemsCount(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ILoopingSelector<D>::ShouldLoop() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ShouldLoop(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>**)this;
            check_hresult(_winrt_abi_type->get_ShouldLoop(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ILoopingSelector<D>::ShouldLoop(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ShouldLoop(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>**)this;
            check_hresult(_winrt_abi_type->put_ShouldLoop(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ILoopingSelector<D>::Items() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Items(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>**)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_Primitives_ILoopingSelector<D>::Items(param::vector<winrt::Windows::Foundation::IInspectable> const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Items(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>**)this;
            check_hresult(_winrt_abi_type->put_Items(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ILoopingSelector<D>::SelectedIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>**)this;
            check_hresult(_winrt_abi_type->get_SelectedIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ILoopingSelector<D>::SelectedIndex(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedIndex(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>**)this;
            check_hresult(_winrt_abi_type->put_SelectedIndex(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ILoopingSelector<D>::SelectedItem() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItem(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>**)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_Primitives_ILoopingSelector<D>::SelectedItem(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>**)&_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::Primitives::ILoopingSelector>**)this;
            check_hresult(_winrt_abi_type->put_SelectedItem(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ILoopingSelector<D>::ItemWidth() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>**)this;
            check_hresult(_winrt_abi_type->get_ItemWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ILoopingSelector<D>::ItemWidth(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemWidth(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>**)this;
            check_hresult(_winrt_abi_type->put_ItemWidth(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ILoopingSelector<D>::ItemHeight() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>**)this;
            check_hresult(_winrt_abi_type->get_ItemHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ILoopingSelector<D>::ItemHeight(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ItemHeight(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>**)this;
            check_hresult(_winrt_abi_type->put_ItemHeight(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ILoopingSelector<D>::ItemTemplate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemTemplate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>**)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_Primitives_ILoopingSelector<D>::ItemTemplate(winrt::Microsoft::UI::Xaml::DataTemplate const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>**)&_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::Primitives::ILoopingSelector>**)this;
            check_hresult(_winrt_abi_type->put_ItemTemplate(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ILoopingSelector<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::Primitives::ILoopingSelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>**)&_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::Primitives::ILoopingSelector>**)this;
            check_hresult(_winrt_abi_type->add_SelectionChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ILoopingSelector<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_Primitives_ILoopingSelector<D>::SelectionChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>**)&_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::Primitives::ILoopingSelector>**)this;
            _winrt_abi_type->remove_SelectionChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ILoopingSelectorStatics<D>::ShouldLoopProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ShouldLoopProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics>**)this;
            check_hresult(_winrt_abi_type->get_ShouldLoopProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ILoopingSelectorStatics<D>::ItemsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics>**)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_Primitives_ILoopingSelectorStatics<D>::SelectedIndexProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedIndexProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics>**)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_Primitives_ILoopingSelectorStatics<D>::SelectedItemProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItemProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics>**)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_Primitives_ILoopingSelectorStatics<D>::ItemWidthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemWidthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics>**)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_Primitives_ILoopingSelectorStatics<D>::ItemHeightProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemHeightProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics>**)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_Primitives_ILoopingSelectorStatics<D>::ItemTemplateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ItemTemplateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics>**)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_Primitives_IMenuFlyoutItemTemplateSettings<D>::KeyboardAcceleratorTextMinWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IMenuFlyoutItemTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMenuFlyoutItemTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMenuFlyoutItemTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_KeyboardAcceleratorTextMinWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMenuFlyoutItemTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_KeyboardAcceleratorTextMinWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IMenuFlyoutPresenterTemplateSettings<D>::FlyoutContentMinWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IMenuFlyoutPresenterTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMenuFlyoutPresenterTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMenuFlyoutPresenterTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FlyoutContentMinWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMenuFlyoutPresenterTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_FlyoutContentMinWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IMonochromaticOverlayPresenter<D>::SourceElement() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SourceElement(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenter>**)this;
            check_hresult(_winrt_abi_type->get_SourceElement(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IMonochromaticOverlayPresenter<D>::SourceElement(winrt::Microsoft::UI::Xaml::UIElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SourceElement(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenter>**)this;
            check_hresult(_winrt_abi_type->put_SourceElement(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IMonochromaticOverlayPresenter<D>::ReplacementColor() const
    {
        winrt::Windows::UI::Color value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ReplacementColor(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenter>**)this;
            check_hresult(_winrt_abi_type->get_ReplacementColor(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IMonochromaticOverlayPresenter<D>::ReplacementColor(winrt::Windows::UI::Color const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ReplacementColor(impl::bind_in(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenter>**)this;
            check_hresult(_winrt_abi_type->put_ReplacementColor(impl::bind_in(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IMonochromaticOverlayPresenterFactory<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::Primitives::IMonochromaticOverlayPresenterFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenterFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenterFactory>**)&_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::Primitives::IMonochromaticOverlayPresenterFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::MonochromaticOverlayPresenter{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IMonochromaticOverlayPresenterStatics<D>::SourceElementProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SourceElementProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_SourceElementProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IMonochromaticOverlayPresenterStatics<D>::ReplacementColorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ReplacementColorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenterStatics>**)this;
            check_hresult(_winrt_abi_type->get_ReplacementColorProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_INavigationViewItemPresenter<D>::Icon() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Icon(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenter>**)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_Primitives_INavigationViewItemPresenter<D>::Icon(winrt::Microsoft::UI::Xaml::Controls::IconElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenter>**)&_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::Primitives::INavigationViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->put_Icon(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_INavigationViewItemPresenter<D>::TemplateSettings() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenter>**)this;
            check_hresult(_winrt_abi_type->get_TemplateSettings(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::NavigationViewItemPresenterTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_INavigationViewItemPresenter2<D>::InfoBadge() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenter2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenter2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenter2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InfoBadge(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenter2>**)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_Primitives_INavigationViewItemPresenter2<D>::InfoBadge(winrt::Microsoft::UI::Xaml::Controls::InfoBadge const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenter2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenter2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenter2>**)&_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::Primitives::INavigationViewItemPresenter2>**)this;
            check_hresult(_winrt_abi_type->put_InfoBadge(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_INavigationViewItemPresenterFactory<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::Primitives::INavigationViewItemPresenterFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterFactory>**)&_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::Primitives::INavigationViewItemPresenterFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::NavigationViewItemPresenter{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_INavigationViewItemPresenterStatics<D>::IconProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IconProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterStatics>**)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_Primitives_INavigationViewItemPresenterStatics<D>::TemplateSettingsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TemplateSettingsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterStatics>**)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_Primitives_INavigationViewItemPresenterStatics2<D>::InfoBadgeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InfoBadgeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterStatics2>**)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_Primitives_INavigationViewItemPresenterTemplateSettings<D>::IconWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IconWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_IconWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_INavigationViewItemPresenterTemplateSettings<D>::SmallerIconWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SmallerIconWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_SmallerIconWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_INavigationViewItemPresenterTemplateSettingsFactory<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::Primitives::INavigationViewItemPresenterTemplateSettingsFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterTemplateSettingsFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterTemplateSettingsFactory>**)&_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::Primitives::INavigationViewItemPresenterTemplateSettingsFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::NavigationViewItemPresenterTemplateSettings{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_INavigationViewItemPresenterTemplateSettingsStatics<D>::IconWidthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterTemplateSettingsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterTemplateSettingsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterTemplateSettingsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IconWidthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterTemplateSettingsStatics>**)this;
            check_hresult(_winrt_abi_type->get_IconWidthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_INavigationViewItemPresenterTemplateSettingsStatics<D>::SmallerIconWidthProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterTemplateSettingsStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterTemplateSettingsStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterTemplateSettingsStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SmallerIconWidthProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterTemplateSettingsStatics>**)this;
            check_hresult(_winrt_abi_type->get_SmallerIconWidthProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IOrientedVirtualizingPanel<D>::CanVerticallyScroll() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanVerticallyScroll(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)this;
            check_hresult(_winrt_abi_type->get_CanVerticallyScroll(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IOrientedVirtualizingPanel<D>::CanVerticallyScroll(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CanVerticallyScroll(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)this;
            check_hresult(_winrt_abi_type->put_CanVerticallyScroll(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IOrientedVirtualizingPanel<D>::CanHorizontallyScroll() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanHorizontallyScroll(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)this;
            check_hresult(_winrt_abi_type->get_CanHorizontallyScroll(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IOrientedVirtualizingPanel<D>::CanHorizontallyScroll(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CanHorizontallyScroll(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)this;
            check_hresult(_winrt_abi_type->put_CanHorizontallyScroll(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IOrientedVirtualizingPanel<D>::ExtentWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExtentWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)this;
            check_hresult(_winrt_abi_type->get_ExtentWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IOrientedVirtualizingPanel<D>::ExtentHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExtentHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)this;
            check_hresult(_winrt_abi_type->get_ExtentHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IOrientedVirtualizingPanel<D>::ViewportWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ViewportWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)this;
            check_hresult(_winrt_abi_type->get_ViewportWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IOrientedVirtualizingPanel<D>::ViewportHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ViewportHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)this;
            check_hresult(_winrt_abi_type->get_ViewportHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IOrientedVirtualizingPanel<D>::HorizontalOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IOrientedVirtualizingPanel<D>::VerticalOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)this;
            check_hresult(_winrt_abi_type->get_VerticalOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IOrientedVirtualizingPanel<D>::ScrollOwner() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ScrollOwner(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)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_Primitives_IOrientedVirtualizingPanel<D>::ScrollOwner(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)&_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::Primitives::IOrientedVirtualizingPanel>**)this;
            check_hresult(_winrt_abi_type->put_ScrollOwner(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IOrientedVirtualizingPanel<D>::LineUp() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->LineUp());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)this;
            check_hresult(_winrt_abi_type->LineUp());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IOrientedVirtualizingPanel<D>::LineDown() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->LineDown());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)this;
            check_hresult(_winrt_abi_type->LineDown());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IOrientedVirtualizingPanel<D>::LineLeft() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->LineLeft());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)this;
            check_hresult(_winrt_abi_type->LineLeft());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IOrientedVirtualizingPanel<D>::LineRight() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->LineRight());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)this;
            check_hresult(_winrt_abi_type->LineRight());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IOrientedVirtualizingPanel<D>::PageUp() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->PageUp());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)this;
            check_hresult(_winrt_abi_type->PageUp());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IOrientedVirtualizingPanel<D>::PageDown() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->PageDown());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)this;
            check_hresult(_winrt_abi_type->PageDown());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IOrientedVirtualizingPanel<D>::PageLeft() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->PageLeft());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)this;
            check_hresult(_winrt_abi_type->PageLeft());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IOrientedVirtualizingPanel<D>::PageRight() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->PageRight());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)this;
            check_hresult(_winrt_abi_type->PageRight());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IOrientedVirtualizingPanel<D>::MouseWheelUp() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->MouseWheelUp());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)this;
            check_hresult(_winrt_abi_type->MouseWheelUp());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IOrientedVirtualizingPanel<D>::MouseWheelDown() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->MouseWheelDown());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)this;
            check_hresult(_winrt_abi_type->MouseWheelDown());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IOrientedVirtualizingPanel<D>::MouseWheelLeft() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->MouseWheelLeft());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)this;
            check_hresult(_winrt_abi_type->MouseWheelLeft());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IOrientedVirtualizingPanel<D>::MouseWheelRight() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->MouseWheelRight());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)this;
            check_hresult(_winrt_abi_type->MouseWheelRight());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IOrientedVirtualizingPanel<D>::SetHorizontalOffset(double offset) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetHorizontalOffset(offset));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)this;
            check_hresult(_winrt_abi_type->SetHorizontalOffset(offset));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IOrientedVirtualizingPanel<D>::SetVerticalOffset(double offset) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetVerticalOffset(offset));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)this;
            check_hresult(_winrt_abi_type->SetVerticalOffset(offset));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IOrientedVirtualizingPanel<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::Primitives::IOrientedVirtualizingPanel>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>**)&_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::Primitives::IOrientedVirtualizingPanel>**)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_Primitives_IPickerFlyoutBaseFactory<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::Primitives::IPickerFlyoutBaseFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseFactory>**)&_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::Primitives::IPickerFlyoutBaseFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::PickerFlyoutBase{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPickerFlyoutBaseOverrides<D>::OnConfirmed() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnConfirmed());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseOverrides>**)this;
            check_hresult(_winrt_abi_type->OnConfirmed());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPickerFlyoutBaseOverrides<D>::ShouldShowConfirmationButtons() const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->ShouldShowConfirmationButtons(&result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseOverrides>**)this;
            check_hresult(_winrt_abi_type->ShouldShowConfirmationButtons(&result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPickerFlyoutBaseStatics<D>::TitleProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_TitleProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseStatics>**)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_Primitives_IPickerFlyoutBaseStatics<D>::GetTitle(winrt::Microsoft::UI::Xaml::DependencyObject const& element) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetTitle(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseStatics>**)this;
            check_hresult(_winrt_abi_type->GetTitle(*(void**)(&element), &result));
        }
        return hstring{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPickerFlyoutBaseStatics<D>::SetTitle(winrt::Microsoft::UI::Xaml::DependencyObject const& element, param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetTitle(*(void**)(&element), *(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseStatics>**)this;
            check_hresult(_winrt_abi_type->SetTitle(*(void**)(&element), *(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPivotHeaderItemFactory<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::Primitives::IPivotHeaderItemFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPivotHeaderItemFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPivotHeaderItemFactory>**)&_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::Primitives::IPivotHeaderItemFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::PivotHeaderItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopup<D>::Child() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Child(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)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_Primitives_IPopup<D>::Child(winrt::Microsoft::UI::Xaml::UIElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)&_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::Primitives::IPopup>**)this;
            check_hresult(_winrt_abi_type->put_Child(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopup<D>::IsOpen() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsOpen(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)this;
            check_hresult(_winrt_abi_type->get_IsOpen(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopup<D>::IsOpen(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsOpen(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)this;
            check_hresult(_winrt_abi_type->put_IsOpen(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopup<D>::HorizontalOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopup<D>::HorizontalOffset(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalOffset(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalOffset(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopup<D>::VerticalOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)this;
            check_hresult(_winrt_abi_type->get_VerticalOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopup<D>::VerticalOffset(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalOffset(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)this;
            check_hresult(_winrt_abi_type->put_VerticalOffset(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopup<D>::ChildTransitions() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ChildTransitions(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)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_Primitives_IPopup<D>::ChildTransitions(winrt::Microsoft::UI::Xaml::Media::Animation::TransitionCollection const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)&_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::Primitives::IPopup>**)this;
            check_hresult(_winrt_abi_type->put_ChildTransitions(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopup<D>::IsLightDismissEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsLightDismissEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)this;
            check_hresult(_winrt_abi_type->get_IsLightDismissEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopup<D>::IsLightDismissEnabled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsLightDismissEnabled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)this;
            check_hresult(_winrt_abi_type->put_IsLightDismissEnabled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopup<D>::LightDismissOverlayMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)&_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::Primitives::IPopup>**)this;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopup<D>::LightDismissOverlayMode(winrt::Microsoft::UI::Xaml::Controls::LightDismissOverlayMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)&_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::Primitives::IPopup>**)this;
            check_hresult(_winrt_abi_type->put_LightDismissOverlayMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopup<D>::ShouldConstrainToRootBounds() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ShouldConstrainToRootBounds(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)this;
            check_hresult(_winrt_abi_type->get_ShouldConstrainToRootBounds(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopup<D>::ShouldConstrainToRootBounds(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ShouldConstrainToRootBounds(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)this;
            check_hresult(_winrt_abi_type->put_ShouldConstrainToRootBounds(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopup<D>::IsConstrainedToRootBounds() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsConstrainedToRootBounds(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)this;
            check_hresult(_winrt_abi_type->get_IsConstrainedToRootBounds(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopup<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::Primitives::IPopup>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)&_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::Primitives::IPopup>**)this;
            check_hresult(_winrt_abi_type->add_Opened(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopup<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_Primitives_IPopup<D>::Opened(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)&_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::Primitives::IPopup>**)this;
            _winrt_abi_type->remove_Opened(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopup<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::Primitives::IPopup>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)&_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::Primitives::IPopup>**)this;
            check_hresult(_winrt_abi_type->add_Closed(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopup<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_Primitives_IPopup<D>::Closed(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>**)&_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::Primitives::IPopup>**)this;
            _winrt_abi_type->remove_Closed(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopup2<D>::PlacementTarget() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlacementTarget(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup2>**)this;
            check_hresult(_winrt_abi_type->get_PlacementTarget(&value));
        }
        return winrt::Microsoft::UI::Xaml::FrameworkElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopup2<D>::PlacementTarget(winrt::Microsoft::UI::Xaml::FrameworkElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup2>**)&_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::Primitives::IPopup2>**)this;
            check_hresult(_winrt_abi_type->put_PlacementTarget(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopup2<D>::DesiredPlacement() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Primitives::PopupPlacementMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DesiredPlacement(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup2>**)this;
            check_hresult(_winrt_abi_type->get_DesiredPlacement(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopup2<D>::DesiredPlacement(winrt::Microsoft::UI::Xaml::Controls::Primitives::PopupPlacementMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_DesiredPlacement(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup2>**)this;
            check_hresult(_winrt_abi_type->put_DesiredPlacement(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopup2<D>::ActualPlacement() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Primitives::PopupPlacementMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ActualPlacement(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup2>**)this;
            check_hresult(_winrt_abi_type->get_ActualPlacement(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopup2<D>::ActualPlacementChanged(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::Primitives::IPopup2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ActualPlacementChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup2>**)this;
            check_hresult(_winrt_abi_type->add_ActualPlacementChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopup2<D>::ActualPlacementChanged(auto_revoke_t, winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, ActualPlacementChanged_revoker>(this, ActualPlacementChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopup2<D>::ActualPlacementChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup2>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ActualPlacementChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup2>**)this;
            _winrt_abi_type->remove_ActualPlacementChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopup3<D>::SystemBackdrop() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup3>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup3, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup3>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SystemBackdrop(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup3>**)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_Primitives_IPopup3<D>::SystemBackdrop(winrt::Microsoft::UI::Xaml::Media::SystemBackdrop const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup3>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup3, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup3>**)&_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::Primitives::IPopup3>**)this;
            check_hresult(_winrt_abi_type->put_SystemBackdrop(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopupStatics<D>::ChildProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ChildProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics>**)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_Primitives_IPopupStatics<D>::IsOpenProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsOpenProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics>**)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_Primitives_IPopupStatics<D>::HorizontalOffsetProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalOffsetProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics>**)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_Primitives_IPopupStatics<D>::VerticalOffsetProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalOffsetProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics>**)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_Primitives_IPopupStatics<D>::ChildTransitionsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ChildTransitionsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics>**)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_Primitives_IPopupStatics<D>::IsLightDismissEnabledProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsLightDismissEnabledProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics>**)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_Primitives_IPopupStatics<D>::LightDismissOverlayModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LightDismissOverlayModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics>**)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_Primitives_IPopupStatics<D>::ShouldConstrainToRootBoundsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ShouldConstrainToRootBoundsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics>**)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_Primitives_IPopupStatics2<D>::PlacementTargetProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PlacementTargetProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics2>**)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_Primitives_IPopupStatics2<D>::DesiredPlacementProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics2>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics2>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DesiredPlacementProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics2>**)this;
            check_hresult(_winrt_abi_type->get_DesiredPlacementProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IPopupStatics3<D>::SystemBackdropProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics3>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics3, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics3>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SystemBackdropProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics3>**)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_Primitives_IRangeBase<D>::Minimum() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Minimum(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>**)this;
            check_hresult(_winrt_abi_type->get_Minimum(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRangeBase<D>::Minimum(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Minimum(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>**)this;
            check_hresult(_winrt_abi_type->put_Minimum(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRangeBase<D>::Maximum() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Maximum(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>**)this;
            check_hresult(_winrt_abi_type->get_Maximum(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRangeBase<D>::Maximum(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Maximum(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>**)this;
            check_hresult(_winrt_abi_type->put_Maximum(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRangeBase<D>::SmallChange() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SmallChange(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>**)this;
            check_hresult(_winrt_abi_type->get_SmallChange(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRangeBase<D>::SmallChange(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SmallChange(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>**)this;
            check_hresult(_winrt_abi_type->put_SmallChange(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRangeBase<D>::LargeChange() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LargeChange(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>**)this;
            check_hresult(_winrt_abi_type->get_LargeChange(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRangeBase<D>::LargeChange(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_LargeChange(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>**)this;
            check_hresult(_winrt_abi_type->put_LargeChange(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRangeBase<D>::Value() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Value(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>**)this;
            check_hresult(_winrt_abi_type->get_Value(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRangeBase<D>::Value(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Value(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>**)this;
            check_hresult(_winrt_abi_type->put_Value(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRangeBase<D>::ValueChanged(winrt::Microsoft::UI::Xaml::Controls::Primitives::RangeBaseValueChangedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>**)&_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::Primitives::IRangeBase>**)this;
            check_hresult(_winrt_abi_type->add_ValueChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRangeBase<D>::ValueChanged(auto_revoke_t, winrt::Microsoft::UI::Xaml::Controls::Primitives::RangeBaseValueChangedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, ValueChanged_revoker>(this, ValueChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRangeBase<D>::ValueChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>**)&_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::Primitives::IRangeBase>**)this;
            _winrt_abi_type->remove_ValueChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRangeBaseFactory<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::Primitives::IRangeBaseFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseFactory>**)&_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::Primitives::IRangeBaseFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::RangeBase{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRangeBaseOverrides<D>::OnMinimumChanged(double oldMinimum, double newMinimum) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnMinimumChanged(oldMinimum, newMinimum));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseOverrides>**)this;
            check_hresult(_winrt_abi_type->OnMinimumChanged(oldMinimum, newMinimum));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRangeBaseOverrides<D>::OnMaximumChanged(double oldMaximum, double newMaximum) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnMaximumChanged(oldMaximum, newMaximum));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseOverrides>**)this;
            check_hresult(_winrt_abi_type->OnMaximumChanged(oldMaximum, newMaximum));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRangeBaseOverrides<D>::OnValueChanged(double oldValue, double newValue) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnValueChanged(oldValue, newValue));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseOverrides>**)this;
            check_hresult(_winrt_abi_type->OnValueChanged(oldValue, newValue));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRangeBaseStatics<D>::MinimumProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinimumProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseStatics>**)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_Primitives_IRangeBaseStatics<D>::MaximumProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaximumProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseStatics>**)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_Primitives_IRangeBaseStatics<D>::SmallChangeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SmallChangeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseStatics>**)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_Primitives_IRangeBaseStatics<D>::LargeChangeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_LargeChangeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseStatics>**)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_Primitives_IRangeBaseStatics<D>::ValueProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ValueProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseStatics>**)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_Primitives_IRangeBaseValueChangedEventArgs<D>::OldValue() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseValueChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseValueChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseValueChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OldValue(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseValueChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_OldValue(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRangeBaseValueChangedEventArgs<D>::NewValue() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseValueChangedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseValueChangedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseValueChangedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NewValue(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseValueChangedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_NewValue(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRepeatButton<D>::Delay() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Delay(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatButton>**)this;
            check_hresult(_winrt_abi_type->get_Delay(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRepeatButton<D>::Delay(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Delay(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatButton>**)this;
            check_hresult(_winrt_abi_type->put_Delay(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRepeatButton<D>::Interval() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Interval(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatButton>**)this;
            check_hresult(_winrt_abi_type->get_Interval(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRepeatButton<D>::Interval(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Interval(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatButton>**)this;
            check_hresult(_winrt_abi_type->put_Interval(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRepeatButtonStatics<D>::DelayProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatButtonStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatButtonStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatButtonStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_DelayProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatButtonStatics>**)this;
            check_hresult(_winrt_abi_type->get_DelayProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRepeatButtonStatics<D>::IntervalProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatButtonStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatButtonStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatButtonStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IntervalProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatButtonStatics>**)this;
            check_hresult(_winrt_abi_type->get_IntervalProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRepeatedScrollSnapPoint<D>::Offset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedScrollSnapPoint>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedScrollSnapPoint, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedScrollSnapPoint>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Offset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedScrollSnapPoint>**)this;
            check_hresult(_winrt_abi_type->get_Offset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRepeatedScrollSnapPoint<D>::Interval() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedScrollSnapPoint>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedScrollSnapPoint, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedScrollSnapPoint>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Interval(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedScrollSnapPoint>**)this;
            check_hresult(_winrt_abi_type->get_Interval(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRepeatedScrollSnapPoint<D>::Start() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedScrollSnapPoint>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedScrollSnapPoint, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedScrollSnapPoint>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Start(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedScrollSnapPoint>**)this;
            check_hresult(_winrt_abi_type->get_Start(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRepeatedScrollSnapPoint<D>::End() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedScrollSnapPoint>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedScrollSnapPoint, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedScrollSnapPoint>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_End(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedScrollSnapPoint>**)this;
            check_hresult(_winrt_abi_type->get_End(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRepeatedScrollSnapPointFactory<D>::CreateInstance(double offset, double interval, double start, double end, winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollSnapPointsAlignment const& alignment, 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::Primitives::IRepeatedScrollSnapPointFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedScrollSnapPointFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedScrollSnapPointFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(offset, interval, start, end, static_cast<int32_t>(alignment), *(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedScrollSnapPointFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(offset, interval, start, end, static_cast<int32_t>(alignment), *(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::RepeatedScrollSnapPoint{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRepeatedZoomSnapPoint<D>::Offset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedZoomSnapPoint>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedZoomSnapPoint, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedZoomSnapPoint>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Offset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedZoomSnapPoint>**)this;
            check_hresult(_winrt_abi_type->get_Offset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRepeatedZoomSnapPoint<D>::Interval() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedZoomSnapPoint>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedZoomSnapPoint, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedZoomSnapPoint>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Interval(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedZoomSnapPoint>**)this;
            check_hresult(_winrt_abi_type->get_Interval(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRepeatedZoomSnapPoint<D>::Start() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedZoomSnapPoint>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedZoomSnapPoint, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedZoomSnapPoint>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Start(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedZoomSnapPoint>**)this;
            check_hresult(_winrt_abi_type->get_Start(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRepeatedZoomSnapPoint<D>::End() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedZoomSnapPoint>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedZoomSnapPoint, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedZoomSnapPoint>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_End(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedZoomSnapPoint>**)this;
            check_hresult(_winrt_abi_type->get_End(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IRepeatedZoomSnapPointFactory<D>::CreateInstance(double offset, double interval, double start, double end, 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::Primitives::IRepeatedZoomSnapPointFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedZoomSnapPointFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedZoomSnapPointFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(offset, interval, start, end, *(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedZoomSnapPointFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(offset, interval, start, end, *(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::RepeatedZoomSnapPoint{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollBar<D>::Orientation() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Orientation value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar>**)&_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::Primitives::IScrollBar>**)this;
            check_hresult(_winrt_abi_type->get_Orientation(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollBar<D>::Orientation(winrt::Microsoft::UI::Xaml::Controls::Orientation const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar>**)&_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::Primitives::IScrollBar>**)this;
            check_hresult(_winrt_abi_type->put_Orientation(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollBar<D>::ViewportSize() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ViewportSize(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar>**)this;
            check_hresult(_winrt_abi_type->get_ViewportSize(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollBar<D>::ViewportSize(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_ViewportSize(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar>**)this;
            check_hresult(_winrt_abi_type->put_ViewportSize(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollBar<D>::IndicatorMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollingIndicatorMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IndicatorMode(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar>**)this;
            check_hresult(_winrt_abi_type->get_IndicatorMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollBar<D>::IndicatorMode(winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollingIndicatorMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IndicatorMode(static_cast<int32_t>(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar>**)this;
            check_hresult(_winrt_abi_type->put_IndicatorMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollBar<D>::Scroll(winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Scroll(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar>**)this;
            check_hresult(_winrt_abi_type->add_Scroll(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollBar<D>::Scroll(auto_revoke_t, winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, Scroll_revoker>(this, Scroll(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollBar<D>::Scroll(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Scroll(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar>**)this;
            _winrt_abi_type->remove_Scroll(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollBarStatics<D>::OrientationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OrientationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBarStatics>**)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_Primitives_IScrollBarStatics<D>::ViewportSizeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ViewportSizeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_ViewportSizeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollBarStatics<D>::IndicatorModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IndicatorModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_IndicatorModeProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollController<D>::PanningInfo() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PanningInfo(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)this;
            check_hresult(_winrt_abi_type->get_PanningInfo(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollController<D>::CanScroll() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CanScroll(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)this;
            check_hresult(_winrt_abi_type->get_CanScroll(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollController<D>::IsScrollingWithMouse() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsScrollingWithMouse(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)this;
            check_hresult(_winrt_abi_type->get_IsScrollingWithMouse(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollController<D>::SetIsScrollable(bool isScrollable) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetIsScrollable(isScrollable));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)this;
            check_hresult(_winrt_abi_type->SetIsScrollable(isScrollable));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollController<D>::SetValues(double minOffset, double maxOffset, double offset, double viewportLength) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetValues(minOffset, maxOffset, offset, viewportLength));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)this;
            check_hresult(_winrt_abi_type->SetValues(minOffset, maxOffset, offset, viewportLength));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollController<D>::GetScrollAnimation(int32_t correlationId, winrt::Windows::Foundation::Numerics::float2 const& startPosition, winrt::Windows::Foundation::Numerics::float2 const& endPosition, winrt::Microsoft::UI::Composition::CompositionAnimation const& defaultAnimation) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetScrollAnimation(correlationId, impl::bind_in(startPosition), impl::bind_in(endPosition), *(void**)(&defaultAnimation), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)this;
            check_hresult(_winrt_abi_type->GetScrollAnimation(correlationId, impl::bind_in(startPosition), impl::bind_in(endPosition), *(void**)(&defaultAnimation), &result));
        }
        return winrt::Microsoft::UI::Composition::CompositionAnimation{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollController<D>::NotifyRequestedScrollCompleted(int32_t correlationId) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->NotifyRequestedScrollCompleted(correlationId));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)this;
            check_hresult(_winrt_abi_type->NotifyRequestedScrollCompleted(correlationId));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollController<D>::CanScrollChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_CanScrollChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)this;
            check_hresult(_winrt_abi_type->add_CanScrollChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollController<D>::CanScrollChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, CanScrollChanged_revoker>(this, CanScrollChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollController<D>::CanScrollChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)&_winrt_casted_result;
            _winrt_abi_type->remove_CanScrollChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)this;
            _winrt_abi_type->remove_CanScrollChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollController<D>::IsScrollingWithMouseChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_IsScrollingWithMouseChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)this;
            check_hresult(_winrt_abi_type->add_IsScrollingWithMouseChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollController<D>::IsScrollingWithMouseChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, IsScrollingWithMouseChanged_revoker>(this, IsScrollingWithMouseChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollController<D>::IsScrollingWithMouseChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)&_winrt_casted_result;
            _winrt_abi_type->remove_IsScrollingWithMouseChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)this;
            _winrt_abi_type->remove_IsScrollingWithMouseChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollController<D>::ScrollToRequested(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerScrollToRequestedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ScrollToRequested(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)this;
            check_hresult(_winrt_abi_type->add_ScrollToRequested(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollController<D>::ScrollToRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerScrollToRequestedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, ScrollToRequested_revoker>(this, ScrollToRequested(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollController<D>::ScrollToRequested(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ScrollToRequested(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)this;
            _winrt_abi_type->remove_ScrollToRequested(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollController<D>::ScrollByRequested(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerScrollByRequestedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_ScrollByRequested(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)this;
            check_hresult(_winrt_abi_type->add_ScrollByRequested(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollController<D>::ScrollByRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerScrollByRequestedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, ScrollByRequested_revoker>(this, ScrollByRequested(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollController<D>::ScrollByRequested(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)&_winrt_casted_result;
            _winrt_abi_type->remove_ScrollByRequested(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)this;
            _winrt_abi_type->remove_ScrollByRequested(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollController<D>::AddScrollVelocityRequested(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerAddScrollVelocityRequestedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_AddScrollVelocityRequested(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)this;
            check_hresult(_winrt_abi_type->add_AddScrollVelocityRequested(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollController<D>::AddScrollVelocityRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerAddScrollVelocityRequestedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, AddScrollVelocityRequested_revoker>(this, AddScrollVelocityRequested(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollController<D>::AddScrollVelocityRequested(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)&_winrt_casted_result;
            _winrt_abi_type->remove_AddScrollVelocityRequested(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>**)this;
            _winrt_abi_type->remove_AddScrollVelocityRequested(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollControllerAddScrollVelocityRequestedEventArgs<D>::OffsetVelocity() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerAddScrollVelocityRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerAddScrollVelocityRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerAddScrollVelocityRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OffsetVelocity(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerAddScrollVelocityRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_OffsetVelocity(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollControllerAddScrollVelocityRequestedEventArgs<D>::InertiaDecayRate() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerAddScrollVelocityRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerAddScrollVelocityRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerAddScrollVelocityRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_InertiaDecayRate(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerAddScrollVelocityRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_InertiaDecayRate(&value));
        }
        return winrt::Windows::Foundation::IReference<float>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollControllerAddScrollVelocityRequestedEventArgs<D>::CorrelationId() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerAddScrollVelocityRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerAddScrollVelocityRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerAddScrollVelocityRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CorrelationId(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerAddScrollVelocityRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_CorrelationId(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollControllerAddScrollVelocityRequestedEventArgs<D>::CorrelationId(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerAddScrollVelocityRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerAddScrollVelocityRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerAddScrollVelocityRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CorrelationId(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerAddScrollVelocityRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_CorrelationId(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollControllerAddScrollVelocityRequestedEventArgsFactory<D>::CreateInstance(float offsetVelocity, winrt::Windows::Foundation::IReference<float> const& inertiaDecayRate) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerAddScrollVelocityRequestedEventArgsFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerAddScrollVelocityRequestedEventArgsFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerAddScrollVelocityRequestedEventArgsFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(offsetVelocity, *(void**)(&inertiaDecayRate), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerAddScrollVelocityRequestedEventArgsFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(offsetVelocity, *(void**)(&inertiaDecayRate), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerAddScrollVelocityRequestedEventArgs{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollControllerPanRequestedEventArgs<D>::PointerPoint() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PointerPoint(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_PointerPoint(&value));
        }
        return winrt::Microsoft::UI::Input::PointerPoint{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollControllerPanRequestedEventArgs<D>::Handled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Handled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Handled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollControllerPanRequestedEventArgs<D>::Handled(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Handled(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_Handled(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollControllerPanRequestedEventArgsFactory<D>::CreateInstance(winrt::Microsoft::UI::Input::PointerPoint const& pointerPoint) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanRequestedEventArgsFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanRequestedEventArgsFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanRequestedEventArgsFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&pointerPoint), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanRequestedEventArgsFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&pointerPoint), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerPanRequestedEventArgs{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollControllerPanningInfo<D>::IsRailEnabled() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsRailEnabled(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo>**)this;
            check_hresult(_winrt_abi_type->get_IsRailEnabled(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollControllerPanningInfo<D>::PanOrientation() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Orientation value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PanOrientation(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo>**)this;
            check_hresult(_winrt_abi_type->get_PanOrientation(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollControllerPanningInfo<D>::PanningElementAncestor() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_PanningElementAncestor(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo>**)this;
            check_hresult(_winrt_abi_type->get_PanningElementAncestor(&value));
        }
        return winrt::Microsoft::UI::Xaml::UIElement{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollControllerPanningInfo<D>::SetPanningElementExpressionAnimationSources(winrt::Microsoft::UI::Composition::CompositionPropertySet const& propertySet, param::hstring const& minOffsetPropertyName, param::hstring const& maxOffsetPropertyName, param::hstring const& offsetPropertyName, param::hstring const& multiplierPropertyName) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->SetPanningElementExpressionAnimationSources(*(void**)(&propertySet), *(void**)(&minOffsetPropertyName), *(void**)(&maxOffsetPropertyName), *(void**)(&offsetPropertyName), *(void**)(&multiplierPropertyName)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo>**)this;
            check_hresult(_winrt_abi_type->SetPanningElementExpressionAnimationSources(*(void**)(&propertySet), *(void**)(&minOffsetPropertyName), *(void**)(&maxOffsetPropertyName), *(void**)(&offsetPropertyName), *(void**)(&multiplierPropertyName)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollControllerPanningInfo<D>::Changed(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Changed(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo>**)this;
            check_hresult(_winrt_abi_type->add_Changed(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollControllerPanningInfo<D>::Changed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, Changed_revoker>(this, Changed(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollControllerPanningInfo<D>::Changed(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Changed(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo>**)this;
            _winrt_abi_type->remove_Changed(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollControllerPanningInfo<D>::PanRequested(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo, winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerPanRequestedEventArgs> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_PanRequested(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo>**)this;
            check_hresult(_winrt_abi_type->add_PanRequested(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollControllerPanningInfo<D>::PanRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo, winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerPanRequestedEventArgs> const& handler) const
    {
        return impl::make_event_revoker<D, PanRequested_revoker>(this, PanRequested(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollControllerPanningInfo<D>::PanRequested(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo>**)&_winrt_casted_result;
            _winrt_abi_type->remove_PanRequested(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo>**)this;
            _winrt_abi_type->remove_PanRequested(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollControllerScrollByRequestedEventArgs<D>::OffsetDelta() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollByRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollByRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollByRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OffsetDelta(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollByRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_OffsetDelta(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollControllerScrollByRequestedEventArgs<D>::Options() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollByRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollByRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollByRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Options(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollByRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Options(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollOptions{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollControllerScrollByRequestedEventArgs<D>::CorrelationId() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollByRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollByRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollByRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CorrelationId(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollByRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_CorrelationId(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollControllerScrollByRequestedEventArgs<D>::CorrelationId(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollByRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollByRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollByRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CorrelationId(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollByRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_CorrelationId(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollControllerScrollByRequestedEventArgsFactory<D>::CreateInstance(double offsetDelta, winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollOptions const& options) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollByRequestedEventArgsFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollByRequestedEventArgsFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollByRequestedEventArgsFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(offsetDelta, *(void**)(&options), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollByRequestedEventArgsFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(offsetDelta, *(void**)(&options), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerScrollByRequestedEventArgs{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollControllerScrollToRequestedEventArgs<D>::Offset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollToRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollToRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollToRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Offset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollToRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Offset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollControllerScrollToRequestedEventArgs<D>::Options() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollToRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollToRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollToRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Options(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollToRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_Options(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollOptions{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollControllerScrollToRequestedEventArgs<D>::CorrelationId() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollToRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollToRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollToRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CorrelationId(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollToRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_CorrelationId(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollControllerScrollToRequestedEventArgs<D>::CorrelationId(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollToRequestedEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollToRequestedEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollToRequestedEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_CorrelationId(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollToRequestedEventArgs>**)this;
            check_hresult(_winrt_abi_type->put_CorrelationId(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollControllerScrollToRequestedEventArgsFactory<D>::CreateInstance(double offset, winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollOptions const& options) const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollToRequestedEventArgsFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollToRequestedEventArgsFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollToRequestedEventArgsFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(offset, *(void**)(&options), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollToRequestedEventArgsFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(offset, *(void**)(&options), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerScrollToRequestedEventArgs{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollEventArgs<D>::NewValue() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NewValue(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_NewValue(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollEventArgs<D>::ScrollEventType() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollEventType value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollEventArgs>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollEventArgs, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollEventArgs>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ScrollEventType(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollEventArgs>**)this;
            check_hresult(_winrt_abi_type->get_ScrollEventType(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::Background() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Background(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)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_Primitives_IScrollPresenter<D>::Background(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->put_Background(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::Content() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Content(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)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_Primitives_IScrollPresenter<D>::Content(winrt::Microsoft::UI::Xaml::UIElement const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->put_Content(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ExpressionAnimationSources() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExpressionAnimationSources(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)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_Primitives_IScrollPresenter<D>::HorizontalOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::VerticalOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_VerticalOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ZoomFactor() const
    {
        float value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ZoomFactor(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_ZoomFactor(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ExtentWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExtentWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_ExtentWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ExtentHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ExtentHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_ExtentHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ViewportWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ViewportWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_ViewportWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ViewportHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ViewportHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_ViewportHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ScrollableWidth() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ScrollableWidth(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_ScrollableWidth(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ScrollableHeight() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ScrollableHeight(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_ScrollableHeight(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ContentOrientation() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingContentOrientation value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_ContentOrientation(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ContentOrientation(winrt::Microsoft::UI::Xaml::Controls::ScrollingContentOrientation const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->put_ContentOrientation(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::HorizontalScrollChainMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingChainMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalScrollChainMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::HorizontalScrollChainMode(winrt::Microsoft::UI::Xaml::Controls::ScrollingChainMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalScrollChainMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::VerticalScrollChainMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingChainMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_VerticalScrollChainMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::VerticalScrollChainMode(winrt::Microsoft::UI::Xaml::Controls::ScrollingChainMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->put_VerticalScrollChainMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::HorizontalScrollRailMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingRailMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalScrollRailMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::HorizontalScrollRailMode(winrt::Microsoft::UI::Xaml::Controls::ScrollingRailMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalScrollRailMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::VerticalScrollRailMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingRailMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_VerticalScrollRailMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::VerticalScrollRailMode(winrt::Microsoft::UI::Xaml::Controls::ScrollingRailMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->put_VerticalScrollRailMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::HorizontalScrollMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalScrollMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::HorizontalScrollMode(winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalScrollMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::VerticalScrollMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_VerticalScrollMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::VerticalScrollMode(winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->put_VerticalScrollMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ComputedHorizontalScrollMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_ComputedHorizontalScrollMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ComputedVerticalScrollMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_ComputedVerticalScrollMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ZoomChainMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingChainMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_ZoomChainMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ZoomChainMode(winrt::Microsoft::UI::Xaml::Controls::ScrollingChainMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->put_ZoomChainMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ZoomMode() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingZoomMode value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_ZoomMode(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ZoomMode(winrt::Microsoft::UI::Xaml::Controls::ScrollingZoomMode const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->put_ZoomMode(static_cast<int32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::IgnoredInputKinds() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingInputKinds value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_IgnoredInputKinds(reinterpret_cast<uint32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::IgnoredInputKinds(winrt::Microsoft::UI::Xaml::Controls::ScrollingInputKinds const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->put_IgnoredInputKinds(static_cast<uint32_t>(value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::MinZoomFactor() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinZoomFactor(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_MinZoomFactor(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::MinZoomFactor(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MinZoomFactor(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->put_MinZoomFactor(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::MaxZoomFactor() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxZoomFactor(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_MaxZoomFactor(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::MaxZoomFactor(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_MaxZoomFactor(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->put_MaxZoomFactor(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::State() const
    {
        winrt::Microsoft::UI::Xaml::Controls::ScrollingInteractionState value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_State(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::HorizontalScrollController() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalScrollController(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalScrollController(&value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::HorizontalScrollController(winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalScrollController(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalScrollController(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::VerticalScrollController() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalScrollController(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)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_Primitives_IScrollPresenter<D>::VerticalScrollController(winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->put_VerticalScrollController(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::HorizontalAnchorRatio() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalAnchorRatio(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalAnchorRatio(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::HorizontalAnchorRatio(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_HorizontalAnchorRatio(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->put_HorizontalAnchorRatio(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::VerticalAnchorRatio() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalAnchorRatio(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_VerticalAnchorRatio(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::VerticalAnchorRatio(double value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_VerticalAnchorRatio(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->put_VerticalAnchorRatio(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::HorizontalSnapPoints() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalSnapPoints(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_HorizontalSnapPoints(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollSnapPointBase>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::VerticalSnapPoints() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalSnapPoints(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_VerticalSnapPoints(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollSnapPointBase>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ZoomSnapPoints() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ZoomSnapPoints(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->get_ZoomSnapPoints(&value));
        }
        return winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::UI::Xaml::Controls::Primitives::ZoomSnapPointBase>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ScrollTo(double horizontalOffset, double verticalOffset) const
    {
        int32_t result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->ScrollTo(horizontalOffset, verticalOffset, &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<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::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->ScrollToWithOptions(horizontalOffset, verticalOffset, *(void**)(&options), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ScrollBy(double horizontalOffsetDelta, double verticalOffsetDelta) const
    {
        int32_t result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->ScrollBy(horizontalOffsetDelta, verticalOffsetDelta, &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<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::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->ScrollByWithOptions(horizontalOffsetDelta, verticalOffsetDelta, *(void**)(&options), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<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::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)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_Primitives_IScrollPresenter<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::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->ZoomTo(zoomFactor, *(void**)(&centerPoint), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<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::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->ZoomToWithOptions(zoomFactor, *(void**)(&centerPoint), *(void**)(&options), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<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::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->ZoomBy(zoomFactorDelta, *(void**)(&centerPoint), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<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::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->ZoomByWithOptions(zoomFactorDelta, *(void**)(&centerPoint), *(void**)(&options), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<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::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->AddZoomVelocity(zoomFactorVelocity, *(void**)(&centerPoint), *(void**)(&inertiaDecayRate), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ExtentChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->add_ExtentChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ExtentChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, 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_Primitives_IScrollPresenter<D>::ExtentChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            _winrt_abi_type->remove_ExtentChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::StateChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->add_StateChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::StateChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, 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_Primitives_IScrollPresenter<D>::StateChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            _winrt_abi_type->remove_StateChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ViewChanged(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->add_ViewChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ViewChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, 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_Primitives_IScrollPresenter<D>::ViewChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            _winrt_abi_type->remove_ViewChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ScrollAnimationStarting(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, 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::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->add_ScrollAnimationStarting(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ScrollAnimationStarting(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, 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_Primitives_IScrollPresenter<D>::ScrollAnimationStarting(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            _winrt_abi_type->remove_ScrollAnimationStarting(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ZoomAnimationStarting(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, 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::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->add_ZoomAnimationStarting(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ZoomAnimationStarting(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, 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_Primitives_IScrollPresenter<D>::ZoomAnimationStarting(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            _winrt_abi_type->remove_ZoomAnimationStarting(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ScrollCompleted(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, 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::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->add_ScrollCompleted(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ScrollCompleted(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, 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_Primitives_IScrollPresenter<D>::ScrollCompleted(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            _winrt_abi_type->remove_ScrollCompleted(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ZoomCompleted(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, 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::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->add_ZoomCompleted(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::ZoomCompleted(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, 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_Primitives_IScrollPresenter<D>::ZoomCompleted(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            _winrt_abi_type->remove_ZoomCompleted(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::BringingIntoView(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, 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::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->add_BringingIntoView(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::BringingIntoView(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, 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_Primitives_IScrollPresenter<D>::BringingIntoView(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            _winrt_abi_type->remove_BringingIntoView(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::AnchorRequested(winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, 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::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            check_hresult(_winrt_abi_type->add_AnchorRequested(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenter<D>::AnchorRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter, 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_Primitives_IScrollPresenter<D>::AnchorRequested(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>**)&_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::Primitives::IScrollPresenter>**)this;
            _winrt_abi_type->remove_AnchorRequested(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenterFactory<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::Primitives::IScrollPresenterFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterFactory>**)&_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::Primitives::IScrollPresenterFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollPresenterStatics<D>::BackgroundProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_BackgroundProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)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_Primitives_IScrollPresenterStatics<D>::ContentProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)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_Primitives_IScrollPresenterStatics<D>::ContentOrientationProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ContentOrientationProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)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_Primitives_IScrollPresenterStatics<D>::HorizontalScrollChainModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalScrollChainModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)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_Primitives_IScrollPresenterStatics<D>::VerticalScrollChainModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalScrollChainModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)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_Primitives_IScrollPresenterStatics<D>::HorizontalScrollRailModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalScrollRailModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)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_Primitives_IScrollPresenterStatics<D>::VerticalScrollRailModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalScrollRailModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)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_Primitives_IScrollPresenterStatics<D>::HorizontalScrollModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalScrollModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)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_Primitives_IScrollPresenterStatics<D>::VerticalScrollModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalScrollModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)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_Primitives_IScrollPresenterStatics<D>::ComputedHorizontalScrollModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ComputedHorizontalScrollModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)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_Primitives_IScrollPresenterStatics<D>::ComputedVerticalScrollModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ComputedVerticalScrollModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)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_Primitives_IScrollPresenterStatics<D>::ZoomChainModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ZoomChainModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)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_Primitives_IScrollPresenterStatics<D>::ZoomModeProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_ZoomModeProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)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_Primitives_IScrollPresenterStatics<D>::IgnoredInputKindsProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IgnoredInputKindsProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)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_Primitives_IScrollPresenterStatics<D>::MinZoomFactorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MinZoomFactorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)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_Primitives_IScrollPresenterStatics<D>::MaxZoomFactorProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_MaxZoomFactorProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)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_Primitives_IScrollPresenterStatics<D>::HorizontalAnchorRatioProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_HorizontalAnchorRatioProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)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_Primitives_IScrollPresenterStatics<D>::VerticalAnchorRatioProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_VerticalAnchorRatioProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>**)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_Primitives_IScrollSnapPoint<D>::Value() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPoint>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPoint, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPoint>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Value(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPoint>**)this;
            check_hresult(_winrt_abi_type->get_Value(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollSnapPointBase<D>::Alignment() const
    {
        winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollSnapPointsAlignment value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointBase>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointBase, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointBase>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Alignment(reinterpret_cast<int32_t*>(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointBase>**)this;
            check_hresult(_winrt_abi_type->get_Alignment(reinterpret_cast<int32_t*>(&value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollSnapPointFactory<D>::CreateInstance(double snapPointValue, winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollSnapPointsAlignment const& alignment, 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::Primitives::IScrollSnapPointFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(snapPointValue, static_cast<int32_t>(alignment), *(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(snapPointValue, static_cast<int32_t>(alignment), *(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollSnapPoint{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollSnapPointsInfo<D>::AreHorizontalSnapPointsRegular() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AreHorizontalSnapPointsRegular(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo>**)this;
            check_hresult(_winrt_abi_type->get_AreHorizontalSnapPointsRegular(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollSnapPointsInfo<D>::AreVerticalSnapPointsRegular() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_AreVerticalSnapPointsRegular(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo>**)this;
            check_hresult(_winrt_abi_type->get_AreVerticalSnapPointsRegular(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollSnapPointsInfo<D>::HorizontalSnapPointsChanged(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::Primitives::IScrollSnapPointsInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_HorizontalSnapPointsChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo>**)this;
            check_hresult(_winrt_abi_type->add_HorizontalSnapPointsChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollSnapPointsInfo<D>::HorizontalSnapPointsChanged(auto_revoke_t, winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, HorizontalSnapPointsChanged_revoker>(this, HorizontalSnapPointsChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollSnapPointsInfo<D>::HorizontalSnapPointsChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo>**)&_winrt_casted_result;
            _winrt_abi_type->remove_HorizontalSnapPointsChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo>**)this;
            _winrt_abi_type->remove_HorizontalSnapPointsChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollSnapPointsInfo<D>::VerticalSnapPointsChanged(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::Primitives::IScrollSnapPointsInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_VerticalSnapPointsChanged(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo>**)this;
            check_hresult(_winrt_abi_type->add_VerticalSnapPointsChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollSnapPointsInfo<D>::VerticalSnapPointsChanged(auto_revoke_t, winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const& handler) const
    {
        return impl::make_event_revoker<D, VerticalSnapPointsChanged_revoker>(this, VerticalSnapPointsChanged(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollSnapPointsInfo<D>::VerticalSnapPointsChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo>**)&_winrt_casted_result;
            _winrt_abi_type->remove_VerticalSnapPointsChanged(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo>**)this;
            _winrt_abi_type->remove_VerticalSnapPointsChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollSnapPointsInfo<D>::GetIrregularSnapPoints(winrt::Microsoft::UI::Xaml::Controls::Orientation const& orientation, winrt::Microsoft::UI::Xaml::Controls::Primitives::SnapPointsAlignment const& alignment) const
    {
        void* result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetIrregularSnapPoints(static_cast<int32_t>(orientation), static_cast<int32_t>(alignment), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo>**)this;
            check_hresult(_winrt_abi_type->GetIrregularSnapPoints(static_cast<int32_t>(orientation), static_cast<int32_t>(alignment), &result));
        }
        return winrt::Windows::Foundation::Collections::IVectorView<float>{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IScrollSnapPointsInfo<D>::GetRegularSnapPoints(winrt::Microsoft::UI::Xaml::Controls::Orientation const& orientation, winrt::Microsoft::UI::Xaml::Controls::Primitives::SnapPointsAlignment const& alignment, float& offset) const
    {
        float returnValue{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetRegularSnapPoints(static_cast<int32_t>(orientation), static_cast<int32_t>(alignment), &offset, &returnValue));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo>**)this;
            check_hresult(_winrt_abi_type->GetRegularSnapPoints(static_cast<int32_t>(orientation), static_cast<int32_t>(alignment), &offset, &returnValue));
        }
        return returnValue;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ISelector<D>::SelectedIndex() const
    {
        int32_t value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedIndex(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>**)this;
            check_hresult(_winrt_abi_type->get_SelectedIndex(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ISelector<D>::SelectedIndex(int32_t value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_SelectedIndex(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>**)this;
            check_hresult(_winrt_abi_type->put_SelectedIndex(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ISelector<D>::SelectedItem() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItem(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>**)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_Primitives_ISelector<D>::SelectedItem(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>**)&_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::Primitives::ISelector>**)this;
            check_hresult(_winrt_abi_type->put_SelectedItem(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ISelector<D>::SelectedValue() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedValue(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>**)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_Primitives_ISelector<D>::SelectedValue(winrt::Windows::Foundation::IInspectable const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>**)&_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::Primitives::ISelector>**)this;
            check_hresult(_winrt_abi_type->put_SelectedValue(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ISelector<D>::SelectedValuePath() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedValuePath(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>**)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_Primitives_ISelector<D>::SelectedValuePath(param::hstring const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>**)&_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::Primitives::ISelector>**)this;
            check_hresult(_winrt_abi_type->put_SelectedValuePath(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ISelector<D>::IsSynchronizedWithCurrentItem() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSynchronizedWithCurrentItem(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>**)this;
            check_hresult(_winrt_abi_type->get_IsSynchronizedWithCurrentItem(&value));
        }
        return winrt::Windows::Foundation::IReference<bool>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ISelector<D>::IsSynchronizedWithCurrentItem(winrt::Windows::Foundation::IReference<bool> const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsSynchronizedWithCurrentItem(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>**)this;
            check_hresult(_winrt_abi_type->put_IsSynchronizedWithCurrentItem(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ISelector<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::Primitives::ISelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>**)&_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::Primitives::ISelector>**)this;
            check_hresult(_winrt_abi_type->add_SelectionChanged(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ISelector<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_Primitives_ISelector<D>::SelectionChanged(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>**)&_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::Primitives::ISelector>**)this;
            _winrt_abi_type->remove_SelectionChanged(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ISelectorItem<D>::IsSelected() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSelected(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorItem>**)this;
            check_hresult(_winrt_abi_type->get_IsSelected(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ISelectorItem<D>::IsSelected(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorItem>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorItem, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorItem>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsSelected(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorItem>**)this;
            check_hresult(_winrt_abi_type->put_IsSelected(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ISelectorItemFactory<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::Primitives::ISelectorItemFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorItemFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorItemFactory>**)&_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::Primitives::ISelectorItemFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::SelectorItem{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ISelectorItemStatics<D>::IsSelectedProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorItemStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorItemStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorItemStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSelectedProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorItemStatics>**)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_Primitives_ISelectorStatics<D>::SelectedIndexProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedIndexProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorStatics>**)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_Primitives_ISelectorStatics<D>::SelectedItemProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedItemProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorStatics>**)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_Primitives_ISelectorStatics<D>::SelectedValueProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedValueProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorStatics>**)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_Primitives_ISelectorStatics<D>::SelectedValuePathProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_SelectedValuePathProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorStatics>**)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_Primitives_ISelectorStatics<D>::IsSynchronizedWithCurrentItemProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsSynchronizedWithCurrentItemProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsSynchronizedWithCurrentItemProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ISelectorStatics<D>::GetIsSelectionActive(winrt::Microsoft::UI::Xaml::DependencyObject const& element) const
    {
        bool result{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->GetIsSelectionActive(*(void**)(&element), &result));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorStatics>**)this;
            check_hresult(_winrt_abi_type->GetIsSelectionActive(*(void**)(&element), &result));
        }
        return result;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ISplitViewTemplateSettings<D>::OpenPaneLength() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISplitViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISplitViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISplitViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OpenPaneLength(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISplitViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_OpenPaneLength(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ISplitViewTemplateSettings<D>::NegativeOpenPaneLength() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISplitViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISplitViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISplitViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NegativeOpenPaneLength(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISplitViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_NegativeOpenPaneLength(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ISplitViewTemplateSettings<D>::OpenPaneLengthMinusCompactLength() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISplitViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISplitViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISplitViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OpenPaneLengthMinusCompactLength(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISplitViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_OpenPaneLengthMinusCompactLength(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ISplitViewTemplateSettings<D>::NegativeOpenPaneLengthMinusCompactLength() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISplitViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISplitViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISplitViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_NegativeOpenPaneLengthMinusCompactLength(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISplitViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_NegativeOpenPaneLengthMinusCompactLength(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ISplitViewTemplateSettings<D>::OpenPaneGridLength() const
    {
        winrt::Microsoft::UI::Xaml::GridLength value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISplitViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISplitViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISplitViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_OpenPaneGridLength(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISplitViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_OpenPaneGridLength(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ISplitViewTemplateSettings<D>::CompactPaneGridLength() const
    {
        winrt::Microsoft::UI::Xaml::GridLength value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISplitViewTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISplitViewTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISplitViewTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CompactPaneGridLength(put_abi(value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISplitViewTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_CompactPaneGridLength(put_abi(value)));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ITabViewListViewFactory<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::Primitives::ITabViewListViewFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ITabViewListViewFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ITabViewListViewFactory>**)&_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::Primitives::ITabViewListViewFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::TabViewListView{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IThumb<D>::IsDragging() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsDragging(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb>**)this;
            check_hresult(_winrt_abi_type->get_IsDragging(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IThumb<D>::DragStarted(winrt::Microsoft::UI::Xaml::Controls::Primitives::DragStartedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_DragStarted(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb>**)this;
            check_hresult(_winrt_abi_type->add_DragStarted(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IThumb<D>::DragStarted(auto_revoke_t, winrt::Microsoft::UI::Xaml::Controls::Primitives::DragStartedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, DragStarted_revoker>(this, DragStarted(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IThumb<D>::DragStarted(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb>**)&_winrt_casted_result;
            _winrt_abi_type->remove_DragStarted(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb>**)this;
            _winrt_abi_type->remove_DragStarted(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IThumb<D>::DragDelta(winrt::Microsoft::UI::Xaml::Controls::Primitives::DragDeltaEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_DragDelta(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb>**)this;
            check_hresult(_winrt_abi_type->add_DragDelta(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IThumb<D>::DragDelta(auto_revoke_t, winrt::Microsoft::UI::Xaml::Controls::Primitives::DragDeltaEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, DragDelta_revoker>(this, DragDelta(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IThumb<D>::DragDelta(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb>**)&_winrt_casted_result;
            _winrt_abi_type->remove_DragDelta(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb>**)this;
            _winrt_abi_type->remove_DragDelta(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IThumb<D>::DragCompleted(winrt::Microsoft::UI::Xaml::Controls::Primitives::DragCompletedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_DragCompleted(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb>**)this;
            check_hresult(_winrt_abi_type->add_DragCompleted(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IThumb<D>::DragCompleted(auto_revoke_t, winrt::Microsoft::UI::Xaml::Controls::Primitives::DragCompletedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, DragCompleted_revoker>(this, DragCompleted(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IThumb<D>::DragCompleted(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb>**)&_winrt_casted_result;
            _winrt_abi_type->remove_DragCompleted(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb>**)this;
            _winrt_abi_type->remove_DragCompleted(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IThumb<D>::CancelDrag() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CancelDrag());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb>**)this;
            check_hresult(_winrt_abi_type->CancelDrag());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IThumbStatics<D>::IsDraggingProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumbStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumbStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumbStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsDraggingProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumbStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsDraggingProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ITickBar<D>::Fill() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ITickBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ITickBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ITickBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Fill(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ITickBar>**)this;
            check_hresult(_winrt_abi_type->get_Fill(&value));
        }
        return winrt::Microsoft::UI::Xaml::Media::Brush{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ITickBar<D>::Fill(winrt::Microsoft::UI::Xaml::Media::Brush const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ITickBar>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ITickBar, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ITickBar>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_Fill(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ITickBar>**)this;
            check_hresult(_winrt_abi_type->put_Fill(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_ITickBarStatics<D>::FillProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ITickBarStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::ITickBarStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ITickBarStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FillProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::ITickBarStatics>**)this;
            check_hresult(_winrt_abi_type->get_FillProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IToggleButton<D>::IsChecked() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsChecked(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>**)this;
            check_hresult(_winrt_abi_type->get_IsChecked(&value));
        }
        return winrt::Windows::Foundation::IReference<bool>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IToggleButton<D>::IsChecked(winrt::Windows::Foundation::IReference<bool> const& value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsChecked(*(void**)(&value)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>**)this;
            check_hresult(_winrt_abi_type->put_IsChecked(*(void**)(&value)));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IToggleButton<D>::IsThreeState() const
    {
        bool value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsThreeState(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>**)this;
            check_hresult(_winrt_abi_type->get_IsThreeState(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IToggleButton<D>::IsThreeState(bool value) const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->put_IsThreeState(value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>**)this;
            check_hresult(_winrt_abi_type->put_IsThreeState(value));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IToggleButton<D>::Checked(winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Checked(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>**)this;
            check_hresult(_winrt_abi_type->add_Checked(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IToggleButton<D>::Checked(auto_revoke_t, winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, Checked_revoker>(this, Checked(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IToggleButton<D>::Checked(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Checked(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>**)this;
            _winrt_abi_type->remove_Checked(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IToggleButton<D>::Unchecked(winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Unchecked(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>**)this;
            check_hresult(_winrt_abi_type->add_Unchecked(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IToggleButton<D>::Unchecked(auto_revoke_t, winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, Unchecked_revoker>(this, Unchecked(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IToggleButton<D>::Unchecked(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Unchecked(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>**)this;
            _winrt_abi_type->remove_Unchecked(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IToggleButton<D>::Indeterminate(winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const
    {
        winrt::event_token token{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->add_Indeterminate(*(void**)(&handler), put_abi(token)));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>**)this;
            check_hresult(_winrt_abi_type->add_Indeterminate(*(void**)(&handler), put_abi(token)));
        }
        return token;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IToggleButton<D>::Indeterminate(auto_revoke_t, winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const
    {
        return impl::make_event_revoker<D, Indeterminate_revoker>(this, Indeterminate(handler));
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IToggleButton<D>::Indeterminate(winrt::event_token const& token) const noexcept
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>**)&_winrt_casted_result;
            _winrt_abi_type->remove_Indeterminate(impl::bind_in(token));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>**)this;
            _winrt_abi_type->remove_Indeterminate(impl::bind_in(token));
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IToggleButtonFactory<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::Primitives::IToggleButtonFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonFactory>**)&_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::Primitives::IToggleButtonFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::ToggleButton{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IToggleButtonOverrides<D>::OnToggle() const
    {
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonOverrides>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonOverrides, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonOverrides>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->OnToggle());
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonOverrides>**)this;
            check_hresult(_winrt_abi_type->OnToggle());
        }
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IToggleButtonStatics<D>::IsCheckedProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsCheckedProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonStatics>**)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_Primitives_IToggleButtonStatics<D>::IsThreeStateProperty() const
    {
        void* value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonStatics>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonStatics>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_IsThreeStateProperty(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonStatics>**)this;
            check_hresult(_winrt_abi_type->get_IsThreeStateProperty(&value));
        }
        return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IToggleSwitchTemplateSettings<D>::KnobCurrentToOnOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_KnobCurrentToOnOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_KnobCurrentToOnOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IToggleSwitchTemplateSettings<D>::KnobCurrentToOffOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_KnobCurrentToOffOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_KnobCurrentToOffOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IToggleSwitchTemplateSettings<D>::KnobOnToOffOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_KnobOnToOffOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_KnobOnToOffOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IToggleSwitchTemplateSettings<D>::KnobOffToOnOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_KnobOffToOnOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_KnobOffToOnOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IToggleSwitchTemplateSettings<D>::CurtainCurrentToOnOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CurtainCurrentToOnOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_CurtainCurrentToOnOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IToggleSwitchTemplateSettings<D>::CurtainCurrentToOffOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CurtainCurrentToOffOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_CurtainCurrentToOffOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IToggleSwitchTemplateSettings<D>::CurtainOnToOffOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CurtainOnToOffOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_CurtainOnToOffOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IToggleSwitchTemplateSettings<D>::CurtainOffToOnOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_CurtainOffToOnOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_CurtainOffToOnOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IToolTipTemplateSettings<D>::FromHorizontalOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToolTipTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToolTipTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToolTipTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FromHorizontalOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToolTipTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_FromHorizontalOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IToolTipTemplateSettings<D>::FromVerticalOffset() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToolTipTemplateSettings>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToolTipTemplateSettings, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToolTipTemplateSettings>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_FromVerticalOffset(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToolTipTemplateSettings>**)this;
            check_hresult(_winrt_abi_type->get_FromVerticalOffset(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IZoomSnapPoint<D>::Value() const
    {
        double value{};
        if constexpr (!std::is_same_v<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IZoomSnapPoint>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IZoomSnapPoint, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IZoomSnapPoint>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->get_Value(&value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IZoomSnapPoint>**)this;
            check_hresult(_winrt_abi_type->get_Value(&value));
        }
        return value;
    }
    template <typename D> auto consume_Microsoft_UI_Xaml_Controls_Primitives_IZoomSnapPointFactory<D>::CreateInstance(double snapPointValue, 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::Primitives::IZoomSnapPointFactory>)
        {
            winrt::hresult _winrt_cast_result_code;
            auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Microsoft::UI::Xaml::Controls::Primitives::IZoomSnapPointFactory, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
            check_hresult(_winrt_cast_result_code);
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IZoomSnapPointFactory>**)&_winrt_casted_result;
            check_hresult(_winrt_abi_type->CreateInstance(snapPointValue, *(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        else
        {
            auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::UI::Xaml::Controls::Primitives::IZoomSnapPointFactory>**)this;
            check_hresult(_winrt_abi_type->CreateInstance(snapPointValue, *(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
        }
        return winrt::Microsoft::UI::Xaml::Controls::Primitives::ZoomSnapPoint{ value, take_ownership_from_abi };
    }
    template <typename H> struct delegate<winrt::Microsoft::UI::Xaml::Controls::Primitives::DragCompletedEventHandler, H> final : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::Primitives::DragCompletedEventHandler, H>
    {
        delegate(H&& handler) : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::Primitives::DragCompletedEventHandler, 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::Primitives::DragCompletedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename H> struct delegate<winrt::Microsoft::UI::Xaml::Controls::Primitives::DragDeltaEventHandler, H> final : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::Primitives::DragDeltaEventHandler, H>
    {
        delegate(H&& handler) : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::Primitives::DragDeltaEventHandler, 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::Primitives::DragDeltaEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename H> struct delegate<winrt::Microsoft::UI::Xaml::Controls::Primitives::DragStartedEventHandler, H> final : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::Primitives::DragStartedEventHandler, H>
    {
        delegate(H&& handler) : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::Primitives::DragStartedEventHandler, 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::Primitives::DragStartedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename H> struct delegate<winrt::Microsoft::UI::Xaml::Controls::Primitives::ItemsChangedEventHandler, H> final : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::Primitives::ItemsChangedEventHandler, H>
    {
        delegate(H&& handler) : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::Primitives::ItemsChangedEventHandler, 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::Primitives::ItemsChangedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename H> struct delegate<winrt::Microsoft::UI::Xaml::Controls::Primitives::RangeBaseValueChangedEventHandler, H> final : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::Primitives::RangeBaseValueChangedEventHandler, H>
    {
        delegate(H&& handler) : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::Primitives::RangeBaseValueChangedEventHandler, 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::Primitives::RangeBaseValueChangedEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename H> struct delegate<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollEventHandler, H> final : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollEventHandler, H>
    {
        delegate(H&& handler) : implements_delegate<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollEventHandler, 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::Primitives::ScrollEventArgs const*>(&e));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarButtonTemplateSettings> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarButtonTemplateSettings>
    {
        int32_t __stdcall get_KeyboardAcceleratorTextMinWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().KeyboardAcceleratorTextMinWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings>
    {
        int32_t __stdcall get_ClipRect(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().ClipRect());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CompactVerticalDelta(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().CompactVerticalDelta());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CompactRootMargin(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().CompactRootMargin());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinimalVerticalDelta(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().MinimalVerticalDelta());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MinimalRootMargin(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().MinimalRootMargin());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HiddenVerticalDelta(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().HiddenVerticalDelta());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HiddenRootMargin(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().HiddenRootMargin());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NegativeCompactVerticalDelta(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().NegativeCompactVerticalDelta());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NegativeMinimalVerticalDelta(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().NegativeMinimalVerticalDelta());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NegativeHiddenVerticalDelta(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().NegativeHiddenVerticalDelta());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarToggleButtonTemplateSettings> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarToggleButtonTemplateSettings>
    {
        int32_t __stdcall get_KeyboardAcceleratorTextMinWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().KeyboardAcceleratorTextMinWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IAutoSuggestBoxHelper> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IAutoSuggestBoxHelper>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IAutoSuggestBoxHelperStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IAutoSuggestBoxHelperStatics>
    {
        int32_t __stdcall get_KeepInteriorCornersSquareProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().KeepInteriorCornersSquareProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetKeepInteriorCornersSquare(void* autoSuggestBox, bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetKeepInteriorCornersSquare(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBox const*>(&autoSuggestBox), value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetKeepInteriorCornersSquare(void* autoSuggestBox, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().GetKeepInteriorCornersSquare(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBox const*>(&autoSuggestBox)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase>
    {
        int32_t __stdcall get_ClickMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ClickMode>(this->shim().ClickMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ClickMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ClickMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ClickMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsPointerOver(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsPointerOver());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsPressed(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsPressed());
            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::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::Primitives::IButtonBaseFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBaseFactory>
    {
        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::Primitives::ButtonBase>(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::Primitives::IButtonBaseStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBaseStatics>
    {
        int32_t __stdcall get_ClickModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ClickModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsPointerOverProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsPointerOverProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsPressedProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsPressedProperty());
            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::Primitives::ICalendarPanel> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarPanel>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings>
    {
        int32_t __stdcall get_MinViewWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().MinViewWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HeaderText(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().HeaderText());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_WeekDay1(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().WeekDay1());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_WeekDay2(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().WeekDay2());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_WeekDay3(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().WeekDay3());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_WeekDay4(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().WeekDay4());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_WeekDay5(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().WeekDay5());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_WeekDay6(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().WeekDay6());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_WeekDay7(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(this->shim().WeekDay7());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HasMoreContentAfter(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().HasMoreContentAfter());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HasMoreContentBefore(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().HasMoreContentBefore());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HasMoreViews(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().HasMoreViews());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ClipRect(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().ClipRect());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CenterX(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().CenterX());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CenterY(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().CenterY());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel>
    {
        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 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::Primitives::ICarouselPanelFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanelFactory>
    {
        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::Primitives::CarouselPanel>(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::Primitives::IColorPickerSlider> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorPickerSlider>
    {
        int32_t __stdcall get_ColorChannel(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ColorPickerHsvChannel>(this->shim().ColorChannel());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ColorChannel(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ColorChannel(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ColorPickerHsvChannel 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::Primitives::IColorPickerSliderFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorPickerSliderFactory>
    {
        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::Primitives::ColorPickerSlider>(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::Primitives::IColorPickerSliderStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorPickerSliderStatics>
    {
        int32_t __stdcall get_ColorChannelProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ColorChannelProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum>
    {
        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_HsvColor(winrt::Windows::Foundation::Numerics::float4* value) noexcept final try
        {
            zero_abi<winrt::Windows::Foundation::Numerics::float4>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::Numerics::float4>(this->shim().HsvColor());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HsvColor(winrt::Windows::Foundation::Numerics::float4 value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HsvColor(*reinterpret_cast<winrt::Windows::Foundation::Numerics::float4 const*>(&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_Shape(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ColorSpectrumShape>(this->shim().Shape());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Shape(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Shape(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ColorSpectrumShape const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Components(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ColorSpectrumComponents>(this->shim().Components());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Components(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Components(*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::Primitives::ColorSpectrum, 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::Primitives::IColorSpectrumFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumFactory>
    {
        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::Primitives::ColorSpectrum>(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::Primitives::IColorSpectrumStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics>
    {
        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_HsvColorProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HsvColorProperty());
            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_ShapeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ShapeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ComponentsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ComponentsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayout> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayout>
    {
        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_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(); }
        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(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayoutFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayoutFactory>
    {
        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::Primitives::ColumnMajorUniformToLargestGridLayout>(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::Primitives::IColumnMajorUniformToLargestGridLayoutStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayoutStatics>
    {
        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_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_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(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxHelper> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxHelper>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxHelperStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxHelperStatics>
    {
        int32_t __stdcall get_KeepInteriorCornersSquareProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().KeepInteriorCornersSquareProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetKeepInteriorCornersSquare(void* comboBox, bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetKeepInteriorCornersSquare(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ComboBox const*>(&comboBox), value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetKeepInteriorCornersSquare(void* comboBox, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().GetKeepInteriorCornersSquare(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ComboBox const*>(&comboBox)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxTemplateSettings> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxTemplateSettings>
    {
        int32_t __stdcall get_DropDownOpenedHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().DropDownOpenedHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DropDownClosedHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().DropDownClosedHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DropDownOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().DropDownOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedItemDirection(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::AnimationDirection>(this->shim().SelectedItemDirection());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DropDownContentMinWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().DropDownContentMinWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBar> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBar>
    {
        int32_t __stdcall get_FlyoutTemplateSettings(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::CommandBarFlyoutCommandBarTemplateSettings>(this->shim().FlyoutTemplateSettings());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBar2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBar2>
    {
        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::Primitives::ICommandBarFlyoutCommandBarAutomationPropertiesStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarAutomationPropertiesStatics>
    {
        int32_t __stdcall get_ControlTypeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ControlTypeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetControlType(void* element, int32_t* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Automation::Peers::AutomationControlType>(this->shim().GetControlType(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetControlType(void* element, int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetControlType(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Automation::Peers::AutomationControlType 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::Primitives::ICommandBarFlyoutCommandBarFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarFactory>
    {
        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::Primitives::CommandBarFlyoutCommandBar>(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::Primitives::ICommandBarFlyoutCommandBarStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarStatics>
    {
        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::Primitives::ICommandBarFlyoutCommandBarTemplateSettings> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings>
    {
        int32_t __stdcall get_OpenAnimationStartPosition(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().OpenAnimationStartPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OpenAnimationEndPosition(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().OpenAnimationEndPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CloseAnimationEndPosition(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().CloseAnimationEndPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CurrentWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().CurrentWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExpandedWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ExpandedWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_WidthExpansionDelta(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().WidthExpansionDelta());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_WidthExpansionAnimationStartPosition(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().WidthExpansionAnimationStartPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_WidthExpansionAnimationEndPosition(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().WidthExpansionAnimationEndPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_WidthExpansionMoreButtonAnimationStartPosition(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().WidthExpansionMoreButtonAnimationStartPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_WidthExpansionMoreButtonAnimationEndPosition(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().WidthExpansionMoreButtonAnimationEndPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExpandUpOverflowVerticalPosition(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ExpandUpOverflowVerticalPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExpandDownOverflowVerticalPosition(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ExpandDownOverflowVerticalPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExpandUpAnimationStartPosition(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ExpandUpAnimationStartPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExpandUpAnimationEndPosition(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ExpandUpAnimationEndPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExpandUpAnimationHoldPosition(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ExpandUpAnimationHoldPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExpandDownAnimationStartPosition(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ExpandDownAnimationStartPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExpandDownAnimationEndPosition(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ExpandDownAnimationEndPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExpandDownAnimationHoldPosition(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ExpandDownAnimationHoldPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentClipRect(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().ContentClipRect());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OverflowContentClipRect(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().OverflowContentClipRect());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings>
    {
        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_OverflowContentClipRect(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().OverflowContentClipRect());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OverflowContentMinWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().OverflowContentMinWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OverflowContentMaxWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().OverflowContentMaxWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OverflowContentMaxHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().OverflowContentMaxHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OverflowContentHorizontalOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().OverflowContentHorizontalOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OverflowContentHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().OverflowContentHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NegativeOverflowContentHeight(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().NegativeOverflowContentHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_EffectiveOverflowButtonVisibility(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Visibility>(this->shim().EffectiveOverflowButtonVisibility());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OverflowContentCompactYTranslation(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().OverflowContentCompactYTranslation());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OverflowContentMinimalYTranslation(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().OverflowContentMinimalYTranslation());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OverflowContentHiddenYTranslation(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().OverflowContentHiddenYTranslation());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverter> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverter>
    {
        int32_t __stdcall get_Filter(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::CornerRadiusFilterKind>(this->shim().Filter());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Filter(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Filter(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::CornerRadiusFilterKind const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Scale(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().Scale());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Scale(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Scale(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverterStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverterStatics>
    {
        int32_t __stdcall get_FilterProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FilterProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ScaleProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ScaleProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverter> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverter>
    {
        int32_t __stdcall get_ConversionKind(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::CornerRadiusToThicknessConverterKind>(this->shim().ConversionKind());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ConversionKind(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ConversionKind(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::CornerRadiusToThicknessConverterKind const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Multiplier(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().Multiplier());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Multiplier(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Multiplier(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverterStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverterStatics>
    {
        int32_t __stdcall get_ConversionKindProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ConversionKindProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_MultiplierProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().MultiplierProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragCompletedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragCompletedEventArgs>
    {
        int32_t __stdcall get_HorizontalChange(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().HorizontalChange());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalChange(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().VerticalChange());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Canceled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().Canceled());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragCompletedEventArgsFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragCompletedEventArgsFactory>
    {
        int32_t __stdcall CreateInstanceWithHorizontalChangeVerticalChangeAndCanceled(double horizontalChange, double verticalChange, bool canceled, 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::Primitives::DragCompletedEventArgs>(this->shim().CreateInstanceWithHorizontalChangeVerticalChangeAndCanceled(horizontalChange, verticalChange, canceled, *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::Primitives::IDragDeltaEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragDeltaEventArgs>
    {
        int32_t __stdcall get_HorizontalChange(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().HorizontalChange());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalChange(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().VerticalChange());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragDeltaEventArgsFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragDeltaEventArgsFactory>
    {
        int32_t __stdcall CreateInstanceWithHorizontalChangeAndVerticalChange(double horizontalChange, double verticalChange, 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::Primitives::DragDeltaEventArgs>(this->shim().CreateInstanceWithHorizontalChangeAndVerticalChange(horizontalChange, verticalChange, *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::Primitives::IDragStartedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragStartedEventArgs>
    {
        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(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragStartedEventArgsFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragStartedEventArgsFactory>
    {
        int32_t __stdcall CreateInstanceWithHorizontalOffsetAndVerticalOffset(double horizontalOffset, double verticalOffset, 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::Primitives::DragStartedEventArgs>(this->shim().CreateInstanceWithHorizontalOffsetAndVerticalOffset(horizontalOffset, verticalOffset, *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::Primitives::IFlyoutBase> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase>
    {
        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::FlyoutPlacementMode>(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::FlyoutPlacementMode const*>(&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 get_AllowFocusOnInteraction(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().AllowFocusOnInteraction());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_AllowFocusOnInteraction(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AllowFocusOnInteraction(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_AllowFocusWhenDisabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().AllowFocusWhenDisabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_AllowFocusWhenDisabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AllowFocusWhenDisabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ShowMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutShowMode>(this->shim().ShowMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ShowMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ShowMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutShowMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_InputDevicePrefersPrimaryCommands(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().InputDevicePrefersPrimaryCommands());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AreOpenCloseAnimationsEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().AreOpenCloseAnimationsEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_AreOpenCloseAnimationsEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AreOpenCloseAnimationsEnabled(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_IsConstrainedToRootBounds(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsConstrainedToRootBounds());
            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_OverlayInputPassThroughElement(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyObject>(this->shim().OverlayInputPassThroughElement());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_OverlayInputPassThroughElement(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OverlayInputPassThroughElement(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject 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 get_XamlRoot(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::XamlRoot>(this->shim().XamlRoot());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_XamlRoot(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().XamlRoot(*reinterpret_cast<winrt::Microsoft::UI::Xaml::XamlRoot const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        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 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_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::Primitives::FlyoutBase, winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBaseClosingEventArgs> 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 ShowAt(void* placementTarget) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ShowAt(*reinterpret_cast<winrt::Microsoft::UI::Xaml::FrameworkElement const*>(&placementTarget));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ShowAtWithOptions(void* placementTarget, void* showOptions) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ShowAt(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&placementTarget), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutShowOptions const*>(&showOptions));
            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(); }
        int32_t __stdcall TryInvokeKeyboardAccelerator(void* args) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().TryInvokeKeyboardAccelerator(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::ProcessKeyboardAcceleratorEventArgs const*>(&args));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase2>
    {
        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::Primitives::IFlyoutBaseClosingEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseClosingEventArgs>
    {
        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::Primitives::IFlyoutBaseFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseFactory>
    {
        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::Primitives::FlyoutBase>(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::Primitives::IFlyoutBaseOverrides> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverrides>
    {
        int32_t __stdcall CreatePresenter(void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Controls::Control>(this->shim().CreatePresenter());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnProcessKeyboardAccelerators(void* args) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnProcessKeyboardAccelerators(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Input::ProcessKeyboardAcceleratorEventArgs const*>(&args));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics>
    {
        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_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_AllowFocusOnInteractionProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AllowFocusOnInteractionProperty());
            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_AllowFocusWhenDisabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AllowFocusWhenDisabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ShowModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ShowModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_InputDevicePrefersPrimaryCommandsProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().InputDevicePrefersPrimaryCommandsProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AreOpenCloseAnimationsEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AreOpenCloseAnimationsEnabledProperty());
            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_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_OverlayInputPassThroughElementProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().OverlayInputPassThroughElementProperty());
            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_AttachedFlyoutProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().AttachedFlyoutProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetAttachedFlyout(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::Primitives::FlyoutBase>(this->shim().GetAttachedFlyout(*reinterpret_cast<winrt::Microsoft::UI::Xaml::FrameworkElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetAttachedFlyout(void* element, void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetAttachedFlyout(*reinterpret_cast<winrt::Microsoft::UI::Xaml::FrameworkElement const*>(&element), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ShowAttachedFlyout(void* flyoutOwner) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ShowAttachedFlyout(*reinterpret_cast<winrt::Microsoft::UI::Xaml::FrameworkElement const*>(&flyoutOwner));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics2>
    {
        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::Primitives::IFlyoutShowOptions> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions>
    {
        int32_t __stdcall get_Position(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::Point>>(this->shim().Position());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Position(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Position(*reinterpret_cast<winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::Point> const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExclusionRect(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().ExclusionRect());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ExclusionRect(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ExclusionRect(*reinterpret_cast<winrt::Windows::Foundation::IReference<winrt::Windows::Foundation::Rect> const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ShowMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutShowMode>(this->shim().ShowMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ShowMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ShowMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutShowMode const*>(&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::FlyoutPlacementMode>(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::FlyoutPlacementMode 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::Primitives::IFlyoutShowOptionsFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptionsFactory>
    {
        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::Primitives::FlyoutShowOptions>(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::Primitives::IGeneratorPositionHelper> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGeneratorPositionHelper>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGeneratorPositionHelperStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGeneratorPositionHelperStatics>
    {
        int32_t __stdcall FromIndexAndOffset(int32_t index, int32_t offset, 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().FromIndexAndOffset(index, offset));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter>
    {
        int32_t __stdcall get_SelectionCheckMarkVisualEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().SelectionCheckMarkVisualEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionCheckMarkVisualEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionCheckMarkVisualEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckHintBrush(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().CheckHintBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CheckHintBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CheckHintBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckSelectingBrush(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().CheckSelectingBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CheckSelectingBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CheckSelectingBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBrush(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().CheckBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CheckBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CheckBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DragBackground(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().DragBackground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DragBackground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DragBackground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DragForeground(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().DragForeground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DragForeground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DragForeground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            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_PlaceholderBackground(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().PlaceholderBackground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PlaceholderBackground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PlaceholderBackground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PointerOverBackground(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().PointerOverBackground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PointerOverBackground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PointerOverBackground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedBackground(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().SelectedBackground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedBackground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedBackground(*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_SelectedPointerOverBackground(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().SelectedPointerOverBackground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedPointerOverBackground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedPointerOverBackground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedPointerOverBorderBrush(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().SelectedPointerOverBorderBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedPointerOverBorderBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedPointerOverBorderBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedBorderThickness(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().SelectedBorderThickness());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedBorderThickness(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedBorderThickness(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DisabledOpacity(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().DisabledOpacity());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DisabledOpacity(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DisabledOpacity(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DragOpacity(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().DragOpacity());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DragOpacity(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DragOpacity(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ReorderHintOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ReorderHintOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ReorderHintOffset(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ReorderHintOffset(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_GridViewItemPresenterHorizontalContentAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::HorizontalAlignment>(this->shim().GridViewItemPresenterHorizontalContentAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_GridViewItemPresenterHorizontalContentAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().GridViewItemPresenterHorizontalContentAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::HorizontalAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_GridViewItemPresenterVerticalContentAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::VerticalAlignment>(this->shim().GridViewItemPresenterVerticalContentAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_GridViewItemPresenterVerticalContentAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().GridViewItemPresenterVerticalContentAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::VerticalAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_GridViewItemPresenterPadding(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().GridViewItemPresenterPadding());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_GridViewItemPresenterPadding(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().GridViewItemPresenterPadding(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PointerOverBackgroundMargin(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().PointerOverBackgroundMargin());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PointerOverBackgroundMargin(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PointerOverBackgroundMargin(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentMargin(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().ContentMargin());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ContentMargin(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ContentMargin(*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::Primitives::IGridViewItemPresenterFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterFactory>
    {
        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::Primitives::GridViewItemPresenter>(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::Primitives::IGridViewItemPresenterStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics>
    {
        int32_t __stdcall get_SelectionCheckMarkVisualEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionCheckMarkVisualEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckHintBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CheckHintBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckSelectingBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CheckSelectingBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CheckBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DragBackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DragBackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DragForegroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DragForegroundProperty());
            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_PlaceholderBackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PlaceholderBackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PointerOverBackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PointerOverBackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedBackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedBackgroundProperty());
            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_SelectedPointerOverBackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedPointerOverBackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedPointerOverBorderBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedPointerOverBorderBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedBorderThicknessProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedBorderThicknessProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DisabledOpacityProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DisabledOpacityProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DragOpacityProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DragOpacityProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ReorderHintOffsetProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ReorderHintOffsetProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_GridViewItemPresenterHorizontalContentAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().GridViewItemPresenterHorizontalContentAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_GridViewItemPresenterVerticalContentAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().GridViewItemPresenterVerticalContentAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_GridViewItemPresenterPaddingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().GridViewItemPresenterPaddingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PointerOverBackgroundMarginProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PointerOverBackgroundMarginProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentMarginProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ContentMarginProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemTemplateSettings> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemTemplateSettings>
    {
        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::Primitives::IInfoBarPanel> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanel>
    {
        int32_t __stdcall get_HorizontalOrientationPadding(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().HorizontalOrientationPadding());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalOrientationPadding(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalOrientationPadding(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalOrientationPadding(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().VerticalOrientationPadding());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_VerticalOrientationPadding(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalOrientationPadding(*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::Primitives::IInfoBarPanelFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelFactory>
    {
        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::Primitives::InfoBarPanel>(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::Primitives::IInfoBarPanelStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics>
    {
        int32_t __stdcall get_HorizontalOrientationPaddingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HorizontalOrientationPaddingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalOrientationPaddingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().VerticalOrientationPaddingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetHorizontalOrientationMargin(void* object, struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetHorizontalOrientationMargin(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&object), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetHorizontalOrientationMargin(void* object, struct struct_Microsoft_UI_Xaml_Thickness* result) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().GetHorizontalOrientationMargin(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&object)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_HorizontalOrientationMarginProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().HorizontalOrientationMarginProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetVerticalOrientationMargin(void* object, struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetVerticalOrientationMargin(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&object), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetVerticalOrientationMargin(void* object, struct struct_Microsoft_UI_Xaml_Thickness* result) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Thickness>(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Xaml::Thickness>(this->shim().GetVerticalOrientationMargin(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&object)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalOrientationMarginProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().VerticalOrientationMarginProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IItemsChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IItemsChangedEventArgs>
    {
        int32_t __stdcall get_Action(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().Action());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Position(struct struct_Microsoft_UI_Xaml_Controls_Primitives_GeneratorPosition* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Controls::Primitives::GeneratorPosition>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::GeneratorPosition>(this->shim().Position());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OldPosition(struct struct_Microsoft_UI_Xaml_Controls_Primitives_GeneratorPosition* value) noexcept final try
        {
            zero_abi<winrt::Microsoft::UI::Xaml::Controls::Primitives::GeneratorPosition>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::GeneratorPosition>(this->shim().OldPosition());
            return 0;
        }
        catch (...) { return to_hresult(); }
        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 get_ItemUICount(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().ItemUICount());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverter> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverter>
    {
        int32_t __stdcall get_Enabled(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().Enabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Enabled(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Enabled(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Disabled(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().Disabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Disabled(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Disabled(*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::Primitives::IJumpListItemBackgroundConverterStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverterStatics>
    {
        int32_t __stdcall get_EnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().EnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DisabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DisabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverter> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverter>
    {
        int32_t __stdcall get_Enabled(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().Enabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Enabled(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Enabled(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Disabled(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().Disabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Disabled(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Disabled(*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::Primitives::IJumpListItemForegroundConverterStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverterStatics>
    {
        int32_t __stdcall get_EnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().EnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DisabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DisabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILayoutInformation> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILayoutInformation>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILayoutInformationStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILayoutInformationStatics>
    {
        int32_t __stdcall GetLayoutExceptionElement(void* dispatcher, 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().GetLayoutExceptionElement(*reinterpret_cast<winrt::Windows::Foundation::IInspectable const*>(&dispatcher)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetLayoutSlot(void* element, 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().GetLayoutSlot(*reinterpret_cast<winrt::Microsoft::UI::Xaml::FrameworkElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetAvailableSize(void* element, 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().GetAvailableSize(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter>
    {
        int32_t __stdcall get_SelectionCheckMarkVisualEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().SelectionCheckMarkVisualEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionCheckMarkVisualEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionCheckMarkVisualEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckHintBrush(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().CheckHintBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CheckHintBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CheckHintBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckSelectingBrush(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().CheckSelectingBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CheckSelectingBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CheckSelectingBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBrush(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().CheckBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CheckBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CheckBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DragBackground(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().DragBackground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DragBackground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DragBackground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DragForeground(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().DragForeground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DragForeground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DragForeground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            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_PlaceholderBackground(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().PlaceholderBackground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PlaceholderBackground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PlaceholderBackground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PointerOverBackground(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().PointerOverBackground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PointerOverBackground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PointerOverBackground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedBackground(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().SelectedBackground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedBackground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedBackground(*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_SelectedPointerOverBackground(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().SelectedPointerOverBackground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedPointerOverBackground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedPointerOverBackground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedPointerOverBorderBrush(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().SelectedPointerOverBorderBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedPointerOverBorderBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedPointerOverBorderBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedBorderThickness(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().SelectedBorderThickness());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedBorderThickness(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedBorderThickness(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DisabledOpacity(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().DisabledOpacity());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DisabledOpacity(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DisabledOpacity(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DragOpacity(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().DragOpacity());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DragOpacity(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DragOpacity(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ReorderHintOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ReorderHintOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ReorderHintOffset(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ReorderHintOffset(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ListViewItemPresenterHorizontalContentAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::HorizontalAlignment>(this->shim().ListViewItemPresenterHorizontalContentAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ListViewItemPresenterHorizontalContentAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ListViewItemPresenterHorizontalContentAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::HorizontalAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ListViewItemPresenterVerticalContentAlignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::VerticalAlignment>(this->shim().ListViewItemPresenterVerticalContentAlignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ListViewItemPresenterVerticalContentAlignment(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ListViewItemPresenterVerticalContentAlignment(*reinterpret_cast<winrt::Microsoft::UI::Xaml::VerticalAlignment const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ListViewItemPresenterPadding(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().ListViewItemPresenterPadding());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ListViewItemPresenterPadding(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ListViewItemPresenterPadding(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PointerOverBackgroundMargin(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().PointerOverBackgroundMargin());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PointerOverBackgroundMargin(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PointerOverBackgroundMargin(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentMargin(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().ContentMargin());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ContentMargin(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ContentMargin(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedPressedBackground(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().SelectedPressedBackground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedPressedBackground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedPressedBackground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PressedBackground(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().PressedBackground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PressedBackground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PressedBackground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBoxBrush(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().CheckBoxBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CheckBoxBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CheckBoxBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FocusSecondaryBorderBrush(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().FocusSecondaryBorderBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_FocusSecondaryBorderBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().FocusSecondaryBorderBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::ListViewItemPresenterCheckMode>(this->shim().CheckMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CheckMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CheckMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::ListViewItemPresenterCheckMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PointerOverForeground(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().PointerOverForeground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PointerOverForeground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PointerOverForeground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RevealBackground(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().RevealBackground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_RevealBackground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RevealBackground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RevealBorderBrush(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().RevealBorderBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_RevealBorderBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RevealBorderBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RevealBorderThickness(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().RevealBorderThickness());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_RevealBorderThickness(struct struct_Microsoft_UI_Xaml_Thickness value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RevealBorderThickness(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Thickness const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RevealBackgroundShowsAboveContent(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().RevealBackgroundShowsAboveContent());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_RevealBackgroundShowsAboveContent(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RevealBackgroundShowsAboveContent(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedDisabledBackground(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().SelectedDisabledBackground());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedDisabledBackground(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedDisabledBackground(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckPressedBrush(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().CheckPressedBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CheckPressedBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CheckPressedBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckDisabledBrush(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().CheckDisabledBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CheckDisabledBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CheckDisabledBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBoxPointerOverBrush(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().CheckBoxPointerOverBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CheckBoxPointerOverBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CheckBoxPointerOverBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBoxPressedBrush(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().CheckBoxPressedBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CheckBoxPressedBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CheckBoxPressedBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBoxDisabledBrush(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().CheckBoxDisabledBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CheckBoxDisabledBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CheckBoxDisabledBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBoxSelectedBrush(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().CheckBoxSelectedBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CheckBoxSelectedBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CheckBoxSelectedBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBoxSelectedPointerOverBrush(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().CheckBoxSelectedPointerOverBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CheckBoxSelectedPointerOverBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CheckBoxSelectedPointerOverBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBoxSelectedPressedBrush(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().CheckBoxSelectedPressedBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CheckBoxSelectedPressedBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CheckBoxSelectedPressedBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBoxSelectedDisabledBrush(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().CheckBoxSelectedDisabledBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CheckBoxSelectedDisabledBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CheckBoxSelectedDisabledBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBoxBorderBrush(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().CheckBoxBorderBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CheckBoxBorderBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CheckBoxBorderBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBoxPointerOverBorderBrush(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().CheckBoxPointerOverBorderBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CheckBoxPointerOverBorderBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CheckBoxPointerOverBorderBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBoxPressedBorderBrush(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().CheckBoxPressedBorderBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CheckBoxPressedBorderBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CheckBoxPressedBorderBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBoxDisabledBorderBrush(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().CheckBoxDisabledBorderBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CheckBoxDisabledBorderBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CheckBoxDisabledBorderBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBoxCornerRadius(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().CheckBoxCornerRadius());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_CheckBoxCornerRadius(struct struct_Microsoft_UI_Xaml_CornerRadius value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CheckBoxCornerRadius(*reinterpret_cast<winrt::Microsoft::UI::Xaml::CornerRadius const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionIndicatorCornerRadius(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().SelectionIndicatorCornerRadius());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionIndicatorCornerRadius(struct struct_Microsoft_UI_Xaml_CornerRadius value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionIndicatorCornerRadius(*reinterpret_cast<winrt::Microsoft::UI::Xaml::CornerRadius const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionIndicatorVisualEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().SelectionIndicatorVisualEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionIndicatorVisualEnabled(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionIndicatorVisualEnabled(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionIndicatorMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::ListViewItemPresenterSelectionIndicatorMode>(this->shim().SelectionIndicatorMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionIndicatorMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionIndicatorMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::ListViewItemPresenterSelectionIndicatorMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionIndicatorBrush(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().SelectionIndicatorBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionIndicatorBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionIndicatorBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionIndicatorPointerOverBrush(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().SelectionIndicatorPointerOverBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionIndicatorPointerOverBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionIndicatorPointerOverBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionIndicatorPressedBrush(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().SelectionIndicatorPressedBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionIndicatorPressedBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionIndicatorPressedBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionIndicatorDisabledBrush(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().SelectionIndicatorDisabledBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectionIndicatorDisabledBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectionIndicatorDisabledBrush(*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_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_SelectedInnerBorderBrush(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().SelectedInnerBorderBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SelectedInnerBorderBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SelectedInnerBorderBrush(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Media::Brush const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PointerOverBorderBrush(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().PointerOverBorderBrush());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_PointerOverBorderBrush(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PointerOverBorderBrush(*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::Primitives::IListViewItemPresenterFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterFactory>
    {
        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::Primitives::ListViewItemPresenter>(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::Primitives::IListViewItemPresenterStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics>
    {
        int32_t __stdcall get_SelectionCheckMarkVisualEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionCheckMarkVisualEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckHintBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CheckHintBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckSelectingBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CheckSelectingBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CheckBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DragBackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DragBackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DragForegroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DragForegroundProperty());
            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_PlaceholderBackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PlaceholderBackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PointerOverBackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PointerOverBackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedBackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedBackgroundProperty());
            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_SelectedPointerOverBackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedPointerOverBackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedPointerOverBorderBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedPointerOverBorderBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedBorderThicknessProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedBorderThicknessProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DisabledOpacityProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DisabledOpacityProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DragOpacityProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DragOpacityProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ReorderHintOffsetProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ReorderHintOffsetProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ListViewItemPresenterHorizontalContentAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ListViewItemPresenterHorizontalContentAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ListViewItemPresenterVerticalContentAlignmentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ListViewItemPresenterVerticalContentAlignmentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ListViewItemPresenterPaddingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ListViewItemPresenterPaddingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PointerOverBackgroundMarginProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PointerOverBackgroundMarginProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ContentMarginProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ContentMarginProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedPressedBackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedPressedBackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PressedBackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PressedBackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBoxBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CheckBoxBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FocusSecondaryBorderBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FocusSecondaryBorderBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CheckModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PointerOverForegroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PointerOverForegroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RevealBackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().RevealBackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RevealBorderBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().RevealBorderBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RevealBorderThicknessProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().RevealBorderThicknessProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_RevealBackgroundShowsAboveContentProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().RevealBackgroundShowsAboveContentProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectedDisabledBackgroundProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedDisabledBackgroundProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckPressedBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CheckPressedBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckDisabledBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CheckDisabledBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBoxPointerOverBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CheckBoxPointerOverBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBoxPressedBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CheckBoxPressedBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBoxDisabledBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CheckBoxDisabledBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBoxSelectedBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CheckBoxSelectedBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBoxSelectedPointerOverBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CheckBoxSelectedPointerOverBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBoxSelectedPressedBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CheckBoxSelectedPressedBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBoxSelectedDisabledBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CheckBoxSelectedDisabledBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBoxBorderBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CheckBoxBorderBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBoxPointerOverBorderBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CheckBoxPointerOverBorderBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBoxPressedBorderBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CheckBoxPressedBorderBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBoxDisabledBorderBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CheckBoxDisabledBorderBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CheckBoxCornerRadiusProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().CheckBoxCornerRadiusProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionIndicatorCornerRadiusProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionIndicatorCornerRadiusProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionIndicatorVisualEnabledProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionIndicatorVisualEnabledProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionIndicatorModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionIndicatorModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionIndicatorBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionIndicatorBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionIndicatorPointerOverBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionIndicatorPointerOverBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionIndicatorPressedBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionIndicatorPressedBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SelectionIndicatorDisabledBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectionIndicatorDisabledBrushProperty());
            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_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_SelectedInnerBorderBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SelectedInnerBorderBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PointerOverBorderBrushProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().PointerOverBorderBrushProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemTemplateSettings> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemTemplateSettings>
    {
        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::Primitives::ILoopingSelector> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector>
    {
        int32_t __stdcall get_ShouldLoop(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().ShouldLoop());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ShouldLoop(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ShouldLoop(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 put_Items(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Items(*reinterpret_cast<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::Foundation::IInspectable> 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_ItemWidth(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().ItemWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemWidth(int32_t 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(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().ItemHeight());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ItemHeight(int32_t 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_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 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;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorItem> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorItem>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorPanel> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorPanel>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics>
    {
        int32_t __stdcall get_ShouldLoopProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ShouldLoopProperty());
            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_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_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_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::Primitives::IMenuFlyoutItemTemplateSettings> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IMenuFlyoutItemTemplateSettings>
    {
        int32_t __stdcall get_KeyboardAcceleratorTextMinWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().KeyboardAcceleratorTextMinWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IMenuFlyoutPresenterTemplateSettings> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IMenuFlyoutPresenterTemplateSettings>
    {
        int32_t __stdcall get_FlyoutContentMinWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().FlyoutContentMinWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenter> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenter>
    {
        int32_t __stdcall get_SourceElement(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().SourceElement());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_SourceElement(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SourceElement(*reinterpret_cast<winrt::Microsoft::UI::Xaml::UIElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ReplacementColor(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().ReplacementColor());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ReplacementColor(struct struct_Windows_UI_Color value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ReplacementColor(*reinterpret_cast<winrt::Windows::UI::Color 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::Primitives::IMonochromaticOverlayPresenterFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenterFactory>
    {
        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::Primitives::MonochromaticOverlayPresenter>(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::Primitives::IMonochromaticOverlayPresenterStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenterStatics>
    {
        int32_t __stdcall get_SourceElementProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SourceElementProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ReplacementColorProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ReplacementColorProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenter> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenter>
    {
        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_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::NavigationViewItemPresenterTemplateSettings>(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::Primitives::INavigationViewItemPresenter2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenter2>
    {
        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::Primitives::INavigationViewItemPresenterFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterFactory>
    {
        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::Primitives::NavigationViewItemPresenter>(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::Primitives::INavigationViewItemPresenterStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterStatics>
    {
        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_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::Primitives::INavigationViewItemPresenterStatics2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterStatics2>
    {
        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::Primitives::INavigationViewItemPresenterTemplateSettings> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterTemplateSettings>
    {
        int32_t __stdcall get_IconWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().IconWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SmallerIconWidth(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().SmallerIconWidth());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterTemplateSettingsFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterTemplateSettingsFactory>
    {
        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::Primitives::NavigationViewItemPresenterTemplateSettings>(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::Primitives::INavigationViewItemPresenterTemplateSettingsStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterTemplateSettingsStatics>
    {
        int32_t __stdcall get_IconWidthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IconWidthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_SmallerIconWidthProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().SmallerIconWidthProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel>
    {
        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 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::Primitives::IOrientedVirtualizingPanelFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanelFactory>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBase> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBase>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseFactory>
    {
        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::Primitives::PickerFlyoutBase>(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::Primitives::IPickerFlyoutBaseOverrides> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseOverrides>
    {
        int32_t __stdcall OnConfirmed() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnConfirmed();
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall ShouldShowConfirmationButtons(bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().ShouldShowConfirmationButtons());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseStatics>
    {
        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 GetTitle(void* element, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<hstring>(this->shim().GetTitle(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetTitle(void* element, void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetTitle(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element), *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::Primitives::IPivotHeaderItem> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPivotHeaderItem>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPivotHeaderItemFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPivotHeaderItemFactory>
    {
        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::Primitives::PivotHeaderItem>(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::Primitives::IPivotHeaderPanel> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPivotHeaderPanel>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPivotPanel> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPivotPanel>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup>
    {
        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_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_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_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_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_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_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_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_IsConstrainedToRootBounds(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsConstrainedToRootBounds());
            return 0;
        }
        catch (...) { return to_hresult(); }
        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;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup2>
    {
        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::FrameworkElement>(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::FrameworkElement const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_DesiredPlacement(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::PopupPlacementMode>(this->shim().DesiredPlacement());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_DesiredPlacement(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DesiredPlacement(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::PopupPlacementMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ActualPlacement(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::PopupPlacementMode>(this->shim().ActualPlacement());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_ActualPlacementChanged(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().ActualPlacementChanged(*reinterpret_cast<winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ActualPlacementChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ActualPlacementChanged(*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::Primitives::IPopup3> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup3>
    {
        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::Primitives::IPopupStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics>
    {
        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_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_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_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_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(); }
        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_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_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(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics2> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics2>
    {
        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_DesiredPlacementProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DesiredPlacementProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics3> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics3>
    {
        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::Primitives::IRangeBase> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase>
    {
        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_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_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::Microsoft::UI::Xaml::Controls::Primitives::RangeBaseValueChangedEventHandler 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::Primitives::IRangeBaseFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseFactory>
    {
        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::Primitives::RangeBase>(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::Primitives::IRangeBaseOverrides> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseOverrides>
    {
        int32_t __stdcall OnMinimumChanged(double oldMinimum, double newMinimum) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnMinimumChanged(oldMinimum, newMinimum);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnMaximumChanged(double oldMaximum, double newMaximum) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnMaximumChanged(oldMaximum, newMaximum);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall OnValueChanged(double oldValue, double newValue) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnValueChanged(oldValue, newValue);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseStatics>
    {
        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_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_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::Primitives::IRangeBaseValueChangedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseValueChangedEventArgs>
    {
        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::Primitives::IRepeatButton> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatButton>
    {
        int32_t __stdcall get_Delay(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().Delay());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Delay(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Delay(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Interval(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<int32_t>(this->shim().Interval());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Interval(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Interval(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatButtonStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatButtonStatics>
    {
        int32_t __stdcall get_DelayProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().DelayProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IntervalProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IntervalProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedScrollSnapPoint> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedScrollSnapPoint>
    {
        int32_t __stdcall get_Offset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().Offset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Interval(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().Interval());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Start(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().Start());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_End(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().End());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedScrollSnapPointFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedScrollSnapPointFactory>
    {
        int32_t __stdcall CreateInstance(double offset, double interval, double start, double end, int32_t alignment, 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::Primitives::RepeatedScrollSnapPoint>(this->shim().CreateInstance(offset, interval, start, end, *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollSnapPointsAlignment const*>(&alignment), *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::Primitives::IRepeatedZoomSnapPoint> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedZoomSnapPoint>
    {
        int32_t __stdcall get_Offset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().Offset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Interval(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().Interval());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Start(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().Start());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_End(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().End());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedZoomSnapPointFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedZoomSnapPointFactory>
    {
        int32_t __stdcall CreateInstance(double offset, double interval, double start, double end, 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::Primitives::RepeatedZoomSnapPoint>(this->shim().CreateInstance(offset, interval, start, end, *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::Primitives::IScrollBar> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar>
    {
        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_ViewportSize(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().ViewportSize());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_ViewportSize(double value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ViewportSize(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IndicatorMode(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollingIndicatorMode>(this->shim().IndicatorMode());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IndicatorMode(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IndicatorMode(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollingIndicatorMode const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_Scroll(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().Scroll(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Scroll(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Scroll(*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::Primitives::IScrollBarStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBarStatics>
    {
        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_ViewportSizeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().ViewportSizeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IndicatorModeProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IndicatorModeProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController>
    {
        int32_t __stdcall get_PanningInfo(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo>(this->shim().PanningInfo());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CanScroll(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().CanScroll());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsScrollingWithMouse(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsScrollingWithMouse());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetIsScrollable(bool isScrollable) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetIsScrollable(isScrollable);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetValues(double minOffset, double maxOffset, double offset, double viewportLength) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetValues(minOffset, maxOffset, offset, viewportLength);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetScrollAnimation(int32_t correlationId, winrt::Windows::Foundation::Numerics::float2 startPosition, winrt::Windows::Foundation::Numerics::float2 endPosition, void* defaultAnimation, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Microsoft::UI::Composition::CompositionAnimation>(this->shim().GetScrollAnimation(correlationId, *reinterpret_cast<winrt::Windows::Foundation::Numerics::float2 const*>(&startPosition), *reinterpret_cast<winrt::Windows::Foundation::Numerics::float2 const*>(&endPosition), *reinterpret_cast<winrt::Microsoft::UI::Composition::CompositionAnimation const*>(&defaultAnimation)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall NotifyRequestedScrollCompleted(int32_t correlationId) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().NotifyRequestedScrollCompleted(correlationId);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_CanScrollChanged(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().CanScrollChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_CanScrollChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CanScrollChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_IsScrollingWithMouseChanged(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().IsScrollingWithMouseChanged(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_IsScrollingWithMouseChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsScrollingWithMouseChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_ScrollToRequested(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().ScrollToRequested(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerScrollToRequestedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ScrollToRequested(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ScrollToRequested(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_ScrollByRequested(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().ScrollByRequested(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerScrollByRequestedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_ScrollByRequested(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().ScrollByRequested(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_AddScrollVelocityRequested(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().AddScrollVelocityRequested(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController, winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerAddScrollVelocityRequestedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_AddScrollVelocityRequested(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().AddScrollVelocityRequested(*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::Primitives::IScrollControllerAddScrollVelocityRequestedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerAddScrollVelocityRequestedEventArgs>
    {
        int32_t __stdcall get_OffsetVelocity(float* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<float>(this->shim().OffsetVelocity());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_InertiaDecayRate(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IReference<float>>(this->shim().InertiaDecayRate());
            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 put_CorrelationId(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CorrelationId(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerAddScrollVelocityRequestedEventArgsFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerAddScrollVelocityRequestedEventArgsFactory>
    {
        int32_t __stdcall CreateInstance(float offsetVelocity, void* inertiaDecayRate, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerAddScrollVelocityRequestedEventArgs>(this->shim().CreateInstance(offsetVelocity, *reinterpret_cast<winrt::Windows::Foundation::IReference<float> const*>(&inertiaDecayRate)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanRequestedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanRequestedEventArgs>
    {
        int32_t __stdcall get_PointerPoint(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Input::PointerPoint>(this->shim().PointerPoint());
            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::Primitives::IScrollControllerPanRequestedEventArgsFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanRequestedEventArgsFactory>
    {
        int32_t __stdcall CreateInstance(void* pointerPoint, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerPanRequestedEventArgs>(this->shim().CreateInstance(*reinterpret_cast<winrt::Microsoft::UI::Input::PointerPoint const*>(&pointerPoint)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo>
    {
        int32_t __stdcall get_IsRailEnabled(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsRailEnabled());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PanOrientation(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Orientation>(this->shim().PanOrientation());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_PanningElementAncestor(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().PanningElementAncestor());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall SetPanningElementExpressionAnimationSources(void* propertySet, void* minOffsetPropertyName, void* maxOffsetPropertyName, void* offsetPropertyName, void* multiplierPropertyName) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().SetPanningElementExpressionAnimationSources(*reinterpret_cast<winrt::Microsoft::UI::Composition::CompositionPropertySet const*>(&propertySet), *reinterpret_cast<hstring const*>(&minOffsetPropertyName), *reinterpret_cast<hstring const*>(&maxOffsetPropertyName), *reinterpret_cast<hstring const*>(&offsetPropertyName), *reinterpret_cast<hstring const*>(&multiplierPropertyName));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_Changed(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().Changed(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo, winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Changed(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Changed(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_PanRequested(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().PanRequested(*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo, winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerPanRequestedEventArgs> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_PanRequested(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PanRequested(*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::Primitives::IScrollControllerScrollByRequestedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollByRequestedEventArgs>
    {
        int32_t __stdcall get_OffsetDelta(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().OffsetDelta());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Options(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollOptions>(this->shim().Options());
            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 put_CorrelationId(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CorrelationId(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollByRequestedEventArgsFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollByRequestedEventArgsFactory>
    {
        int32_t __stdcall CreateInstance(double offsetDelta, void* options, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerScrollByRequestedEventArgs>(this->shim().CreateInstance(offsetDelta, *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollOptions const*>(&options)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollToRequestedEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollToRequestedEventArgs>
    {
        int32_t __stdcall get_Offset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().Offset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_Options(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollOptions>(this->shim().Options());
            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 put_CorrelationId(int32_t value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CorrelationId(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollToRequestedEventArgsFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollToRequestedEventArgsFactory>
    {
        int32_t __stdcall CreateInstance(double offset, void* options, void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerScrollToRequestedEventArgs>(this->shim().CreateInstance(offset, *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollOptions const*>(&options)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollEventArgs> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollEventArgs>
    {
        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(); }
        int32_t __stdcall get_ScrollEventType(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollEventType>(this->shim().ScrollEventType());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter>
    {
        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_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_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_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_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_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_HorizontalScrollController(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().HorizontalScrollController());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_HorizontalScrollController(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalScrollController(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController const*>(&value));
            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_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_HorizontalSnapPoints(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::Primitives::ScrollSnapPointBase>>(this->shim().HorizontalSnapPoints());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_VerticalSnapPoints(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::Primitives::ScrollSnapPointBase>>(this->shim().VerticalSnapPoints());
            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<winrt::Microsoft::UI::Xaml::Controls::Primitives::ZoomSnapPointBase>>(this->shim().ZoomSnapPoints());
            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::Primitives::ScrollPresenter, 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::Primitives::ScrollPresenter, 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::Primitives::ScrollPresenter, 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::Primitives::ScrollPresenter, 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::Primitives::ScrollPresenter, 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::Primitives::ScrollPresenter, 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::Primitives::ScrollPresenter, 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::Primitives::ScrollPresenter, 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::Primitives::ScrollPresenter, 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::Primitives::IScrollPresenterFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterFactory>
    {
        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::Primitives::ScrollPresenter>(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::Primitives::IScrollPresenterStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics>
    {
        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_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_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_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::Primitives::IScrollSnapPoint> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPoint>
    {
        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(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointBase> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointBase>
    {
        int32_t __stdcall get_Alignment(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollSnapPointsAlignment>(this->shim().Alignment());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointBaseFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointBaseFactory>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointFactory>
    {
        int32_t __stdcall CreateInstance(double snapPointValue, int32_t alignment, 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::Primitives::ScrollSnapPoint>(this->shim().CreateInstance(snapPointValue, *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollSnapPointsAlignment const*>(&alignment), *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::Primitives::IScrollSnapPointsInfo> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo>
    {
        int32_t __stdcall get_AreHorizontalSnapPointsRegular(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().AreHorizontalSnapPointsRegular());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_AreVerticalSnapPointsRegular(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().AreVerticalSnapPointsRegular());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_HorizontalSnapPointsChanged(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().HorizontalSnapPointsChanged(*reinterpret_cast<winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_HorizontalSnapPointsChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().HorizontalSnapPointsChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_VerticalSnapPointsChanged(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().VerticalSnapPointsChanged(*reinterpret_cast<winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable> const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_VerticalSnapPointsChanged(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().VerticalSnapPointsChanged(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall GetIrregularSnapPoints(int32_t orientation, int32_t alignment, void** result) noexcept final try
        {
            clear_abi(result);
            typename D::abi_guard guard(this->shim());
            *result = detach_from<winrt::Windows::Foundation::Collections::IVectorView<float>>(this->shim().GetIrregularSnapPoints(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Orientation const*>(&orientation), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::SnapPointsAlignment const*>(&alignment)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetRegularSnapPoints(int32_t orientation, int32_t alignment, float* offset, float* returnValue) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *returnValue = detach_from<float>(this->shim().GetRegularSnapPoints(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Orientation const*>(&orientation), *reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::SnapPointsAlignment const*>(&alignment), *offset));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector>
    {
        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_IsSynchronizedWithCurrentItem(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IReference<bool>>(this->shim().IsSynchronizedWithCurrentItem());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsSynchronizedWithCurrentItem(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsSynchronizedWithCurrentItem(*reinterpret_cast<winrt::Windows::Foundation::IReference<bool> 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;
        }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorFactory>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorItem> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorItem>
    {
        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::Primitives::ISelectorItemFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorItemFactory>
    {
        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::Primitives::SelectorItem>(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::Primitives::ISelectorItemStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorItemStatics>
    {
        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::Primitives::ISelectorStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorStatics>
    {
        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(); }
        int32_t __stdcall get_IsSynchronizedWithCurrentItemProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsSynchronizedWithCurrentItemProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall GetIsSelectionActive(void* element, bool* result) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *result = detach_from<bool>(this->shim().GetIsSelectionActive(*reinterpret_cast<winrt::Microsoft::UI::Xaml::DependencyObject const*>(&element)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISnapPointBase> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISnapPointBase>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISnapPointBaseFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISnapPointBaseFactory>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISplitViewTemplateSettings> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISplitViewTemplateSettings>
    {
        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 get_NegativeOpenPaneLength(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().NegativeOpenPaneLength());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OpenPaneLengthMinusCompactLength(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().OpenPaneLengthMinusCompactLength());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_NegativeOpenPaneLengthMinusCompactLength(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().NegativeOpenPaneLengthMinusCompactLength());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_OpenPaneGridLength(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().OpenPaneGridLength());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CompactPaneGridLength(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().CompactPaneGridLength());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ITabViewListView> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ITabViewListView>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ITabViewListViewFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ITabViewListViewFactory>
    {
        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::Primitives::TabViewListView>(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::Primitives::IThumb> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb>
    {
        int32_t __stdcall get_IsDragging(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsDragging());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_DragStarted(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().DragStarted(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::DragStartedEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_DragStarted(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DragStarted(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_DragDelta(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().DragDelta(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::DragDeltaEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_DragDelta(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DragDelta(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_DragCompleted(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().DragCompleted(*reinterpret_cast<winrt::Microsoft::UI::Xaml::Controls::Primitives::DragCompletedEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_DragCompleted(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().DragCompleted(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall CancelDrag() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().CancelDrag();
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumbStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumbStatics>
    {
        int32_t __stdcall get_IsDraggingProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsDraggingProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ITickBar> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ITickBar>
    {
        int32_t __stdcall get_Fill(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().Fill());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_Fill(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Fill(*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::Primitives::ITickBarStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ITickBarStatics>
    {
        int32_t __stdcall get_FillProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().FillProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton>
    {
        int32_t __stdcall get_IsChecked(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Windows::Foundation::IReference<bool>>(this->shim().IsChecked());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsChecked(void* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsChecked(*reinterpret_cast<winrt::Windows::Foundation::IReference<bool> const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_IsThreeState(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(this->shim().IsThreeState());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall put_IsThreeState(bool value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().IsThreeState(value);
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall add_Checked(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().Checked(*reinterpret_cast<winrt::Microsoft::UI::Xaml::RoutedEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Checked(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Checked(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_Unchecked(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().Unchecked(*reinterpret_cast<winrt::Microsoft::UI::Xaml::RoutedEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Unchecked(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Unchecked(*reinterpret_cast<winrt::event_token const*>(&token));
            return 0;
        }
        int32_t __stdcall add_Indeterminate(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().Indeterminate(*reinterpret_cast<winrt::Microsoft::UI::Xaml::RoutedEventHandler const*>(&handler)));
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall remove_Indeterminate(winrt::event_token token) noexcept final
        {
            typename D::abi_guard guard(this->shim());
            this->shim().Indeterminate(*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::Primitives::IToggleButtonFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonFactory>
    {
        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::Primitives::ToggleButton>(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::Primitives::IToggleButtonOverrides> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonOverrides>
    {
        int32_t __stdcall OnToggle() noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().OnToggle();
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonStatics> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonStatics>
    {
        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_IsThreeStateProperty(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::Microsoft::UI::Xaml::DependencyProperty>(this->shim().IsThreeStateProperty());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings>
    {
        int32_t __stdcall get_KnobCurrentToOnOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().KnobCurrentToOnOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_KnobCurrentToOffOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().KnobCurrentToOffOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_KnobOnToOffOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().KnobOnToOffOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_KnobOffToOnOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().KnobOffToOnOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CurtainCurrentToOnOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().CurtainCurrentToOnOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CurtainCurrentToOffOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().CurtainCurrentToOffOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CurtainOnToOffOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().CurtainOnToOffOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_CurtainOffToOnOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().CurtainOffToOnOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToolTipTemplateSettings> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToolTipTemplateSettings>
    {
        int32_t __stdcall get_FromHorizontalOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().FromHorizontalOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_FromVerticalOffset(double* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<double>(this->shim().FromVerticalOffset());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IZoomSnapPoint> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IZoomSnapPoint>
    {
        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(); }
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IZoomSnapPointBase> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IZoomSnapPointBase>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IZoomSnapPointBaseFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IZoomSnapPointBaseFactory>
    {
    };
#endif
#ifndef WINRT_LEAN_AND_MEAN
    template <typename D>
    struct produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IZoomSnapPointFactory> : produce_base<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IZoomSnapPointFactory>
    {
        int32_t __stdcall CreateInstance(double snapPointValue, 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::Primitives::ZoomSnapPoint>(this->shim().CreateInstance(snapPointValue, *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 T, typename D>
struct WINRT_IMPL_EMPTY_BASES produce_dispatch_to_overridable<T, D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverrides>
    : produce_dispatch_to_overridable_base<T, D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverrides>
{
    auto CreatePresenter()
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.CreatePresenter();
        }

        return this->shim().CreatePresenter();
    }
    auto OnProcessKeyboardAccelerators(winrt::Microsoft::UI::Xaml::Input::ProcessKeyboardAcceleratorEventArgs const& args)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnProcessKeyboardAccelerators(args);
        }

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

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

        return this->shim().ShouldShowConfirmationButtons();
    }
};
template <typename T, typename D>
struct WINRT_IMPL_EMPTY_BASES produce_dispatch_to_overridable<T, D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseOverrides>
    : produce_dispatch_to_overridable_base<T, D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseOverrides>
{
    auto OnMinimumChanged(double oldMinimum, double newMinimum)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnMinimumChanged(oldMinimum, newMinimum);
        }

        return this->shim().OnMinimumChanged(oldMinimum, newMinimum);
    }
    auto OnMaximumChanged(double oldMaximum, double newMaximum)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnMaximumChanged(oldMaximum, newMaximum);
        }

        return this->shim().OnMaximumChanged(oldMaximum, newMaximum);
    }
    auto OnValueChanged(double oldValue, double newValue)
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnValueChanged(oldValue, newValue);
        }

        return this->shim().OnValueChanged(oldValue, newValue);
    }
};
template <typename T, typename D>
struct WINRT_IMPL_EMPTY_BASES produce_dispatch_to_overridable<T, D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonOverrides>
    : produce_dispatch_to_overridable_base<T, D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonOverrides>
{
    auto OnToggle()
    {
        if (auto overridable = this->shim_overridable())
        {
            return overridable.OnToggle();
        }

        return this->shim().OnToggle();
    }
};
}
WINRT_EXPORT namespace winrt::Microsoft::UI::Xaml::Controls::Primitives
{
    inline auto AutoSuggestBoxHelper::KeepInteriorCornersSquareProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IAutoSuggestBoxHelperStatics const&), AutoSuggestBoxHelper, IAutoSuggestBoxHelperStatics>([](IAutoSuggestBoxHelperStatics const& f) { return f.KeepInteriorCornersSquareProperty(); });
    }
    inline auto AutoSuggestBoxHelper::SetKeepInteriorCornersSquare(winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBox const& autoSuggestBox, bool value)
    {
        impl::call_factory<AutoSuggestBoxHelper, IAutoSuggestBoxHelperStatics>([&](IAutoSuggestBoxHelperStatics const& f) { return f.SetKeepInteriorCornersSquare(autoSuggestBox, value); });
    }
    inline auto AutoSuggestBoxHelper::GetKeepInteriorCornersSquare(winrt::Microsoft::UI::Xaml::Controls::AutoSuggestBox const& autoSuggestBox)
    {
        return impl::call_factory<AutoSuggestBoxHelper, IAutoSuggestBoxHelperStatics>([&](IAutoSuggestBoxHelperStatics const& f) { return f.GetKeepInteriorCornersSquare(autoSuggestBox); });
    }
    inline auto ButtonBase::ClickModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IButtonBaseStatics const&), ButtonBase, IButtonBaseStatics>([](IButtonBaseStatics const& f) { return f.ClickModeProperty(); });
    }
    inline auto ButtonBase::IsPointerOverProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IButtonBaseStatics const&), ButtonBase, IButtonBaseStatics>([](IButtonBaseStatics const& f) { return f.IsPointerOverProperty(); });
    }
    inline auto ButtonBase::IsPressedProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IButtonBaseStatics const&), ButtonBase, IButtonBaseStatics>([](IButtonBaseStatics const& f) { return f.IsPressedProperty(); });
    }
    inline auto ButtonBase::CommandProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IButtonBaseStatics const&), ButtonBase, IButtonBaseStatics>([](IButtonBaseStatics const& f) { return f.CommandProperty(); });
    }
    inline auto ButtonBase::CommandParameterProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IButtonBaseStatics const&), ButtonBase, IButtonBaseStatics>([](IButtonBaseStatics const& f) { return f.CommandParameterProperty(); });
    }
    inline CalendarPanel::CalendarPanel() :
        CalendarPanel(impl::call_factory_cast<CalendarPanel(*)(winrt::Windows::Foundation::IActivationFactory const&), CalendarPanel>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<CalendarPanel>(); }))
    {
    }
    inline CarouselPanel::CarouselPanel()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<CarouselPanel, ICarouselPanelFactory>([&](ICarouselPanelFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline ColorPickerSlider::ColorPickerSlider()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ColorPickerSlider, IColorPickerSliderFactory>([&](IColorPickerSliderFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto ColorPickerSlider::ColorChannelProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorPickerSliderStatics const&), ColorPickerSlider, IColorPickerSliderStatics>([](IColorPickerSliderStatics const& f) { return f.ColorChannelProperty(); });
    }
    inline ColorSpectrum::ColorSpectrum()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ColorSpectrum, IColorSpectrumFactory>([&](IColorSpectrumFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto ColorSpectrum::ColorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorSpectrumStatics const&), ColorSpectrum, IColorSpectrumStatics>([](IColorSpectrumStatics const& f) { return f.ColorProperty(); });
    }
    inline auto ColorSpectrum::HsvColorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorSpectrumStatics const&), ColorSpectrum, IColorSpectrumStatics>([](IColorSpectrumStatics const& f) { return f.HsvColorProperty(); });
    }
    inline auto ColorSpectrum::MinHueProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorSpectrumStatics const&), ColorSpectrum, IColorSpectrumStatics>([](IColorSpectrumStatics const& f) { return f.MinHueProperty(); });
    }
    inline auto ColorSpectrum::MaxHueProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorSpectrumStatics const&), ColorSpectrum, IColorSpectrumStatics>([](IColorSpectrumStatics const& f) { return f.MaxHueProperty(); });
    }
    inline auto ColorSpectrum::MinSaturationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorSpectrumStatics const&), ColorSpectrum, IColorSpectrumStatics>([](IColorSpectrumStatics const& f) { return f.MinSaturationProperty(); });
    }
    inline auto ColorSpectrum::MaxSaturationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorSpectrumStatics const&), ColorSpectrum, IColorSpectrumStatics>([](IColorSpectrumStatics const& f) { return f.MaxSaturationProperty(); });
    }
    inline auto ColorSpectrum::MinValueProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorSpectrumStatics const&), ColorSpectrum, IColorSpectrumStatics>([](IColorSpectrumStatics const& f) { return f.MinValueProperty(); });
    }
    inline auto ColorSpectrum::MaxValueProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorSpectrumStatics const&), ColorSpectrum, IColorSpectrumStatics>([](IColorSpectrumStatics const& f) { return f.MaxValueProperty(); });
    }
    inline auto ColorSpectrum::ShapeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorSpectrumStatics const&), ColorSpectrum, IColorSpectrumStatics>([](IColorSpectrumStatics const& f) { return f.ShapeProperty(); });
    }
    inline auto ColorSpectrum::ComponentsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColorSpectrumStatics const&), ColorSpectrum, IColorSpectrumStatics>([](IColorSpectrumStatics const& f) { return f.ComponentsProperty(); });
    }
    inline ColumnMajorUniformToLargestGridLayout::ColumnMajorUniformToLargestGridLayout()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ColumnMajorUniformToLargestGridLayout, IColumnMajorUniformToLargestGridLayoutFactory>([&](IColumnMajorUniformToLargestGridLayoutFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto ColumnMajorUniformToLargestGridLayout::MaxColumnsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColumnMajorUniformToLargestGridLayoutStatics const&), ColumnMajorUniformToLargestGridLayout, IColumnMajorUniformToLargestGridLayoutStatics>([](IColumnMajorUniformToLargestGridLayoutStatics const& f) { return f.MaxColumnsProperty(); });
    }
    inline auto ColumnMajorUniformToLargestGridLayout::ColumnSpacingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColumnMajorUniformToLargestGridLayoutStatics const&), ColumnMajorUniformToLargestGridLayout, IColumnMajorUniformToLargestGridLayoutStatics>([](IColumnMajorUniformToLargestGridLayoutStatics const& f) { return f.ColumnSpacingProperty(); });
    }
    inline auto ColumnMajorUniformToLargestGridLayout::RowSpacingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IColumnMajorUniformToLargestGridLayoutStatics const&), ColumnMajorUniformToLargestGridLayout, IColumnMajorUniformToLargestGridLayoutStatics>([](IColumnMajorUniformToLargestGridLayoutStatics const& f) { return f.RowSpacingProperty(); });
    }
    inline auto ComboBoxHelper::KeepInteriorCornersSquareProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IComboBoxHelperStatics const&), ComboBoxHelper, IComboBoxHelperStatics>([](IComboBoxHelperStatics const& f) { return f.KeepInteriorCornersSquareProperty(); });
    }
    inline auto ComboBoxHelper::SetKeepInteriorCornersSquare(winrt::Microsoft::UI::Xaml::Controls::ComboBox const& comboBox, bool value)
    {
        impl::call_factory<ComboBoxHelper, IComboBoxHelperStatics>([&](IComboBoxHelperStatics const& f) { return f.SetKeepInteriorCornersSquare(comboBox, value); });
    }
    inline auto ComboBoxHelper::GetKeepInteriorCornersSquare(winrt::Microsoft::UI::Xaml::Controls::ComboBox const& comboBox)
    {
        return impl::call_factory<ComboBoxHelper, IComboBoxHelperStatics>([&](IComboBoxHelperStatics const& f) { return f.GetKeepInteriorCornersSquare(comboBox); });
    }
    inline CommandBarFlyoutCommandBar::CommandBarFlyoutCommandBar()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<CommandBarFlyoutCommandBar, ICommandBarFlyoutCommandBarFactory>([&](ICommandBarFlyoutCommandBarFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto CommandBarFlyoutCommandBar::SystemBackdropProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICommandBarFlyoutCommandBarStatics const&), CommandBarFlyoutCommandBar, ICommandBarFlyoutCommandBarStatics>([](ICommandBarFlyoutCommandBarStatics const& f) { return f.SystemBackdropProperty(); });
    }
    inline auto CommandBarFlyoutCommandBarAutomationProperties::ControlTypeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICommandBarFlyoutCommandBarAutomationPropertiesStatics const&), CommandBarFlyoutCommandBarAutomationProperties, ICommandBarFlyoutCommandBarAutomationPropertiesStatics>([](ICommandBarFlyoutCommandBarAutomationPropertiesStatics const& f) { return f.ControlTypeProperty(); });
    }
    inline auto CommandBarFlyoutCommandBarAutomationProperties::GetControlType(winrt::Microsoft::UI::Xaml::UIElement const& element)
    {
        return impl::call_factory<CommandBarFlyoutCommandBarAutomationProperties, ICommandBarFlyoutCommandBarAutomationPropertiesStatics>([&](ICommandBarFlyoutCommandBarAutomationPropertiesStatics const& f) { return f.GetControlType(element); });
    }
    inline auto CommandBarFlyoutCommandBarAutomationProperties::SetControlType(winrt::Microsoft::UI::Xaml::UIElement const& element, winrt::Microsoft::UI::Xaml::Automation::Peers::AutomationControlType const& value)
    {
        impl::call_factory<CommandBarFlyoutCommandBarAutomationProperties, ICommandBarFlyoutCommandBarAutomationPropertiesStatics>([&](ICommandBarFlyoutCommandBarAutomationPropertiesStatics const& f) { return f.SetControlType(element, value); });
    }
    inline CornerRadiusFilterConverter::CornerRadiusFilterConverter() :
        CornerRadiusFilterConverter(impl::call_factory_cast<CornerRadiusFilterConverter(*)(winrt::Windows::Foundation::IActivationFactory const&), CornerRadiusFilterConverter>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<CornerRadiusFilterConverter>(); }))
    {
    }
    inline auto CornerRadiusFilterConverter::FilterProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICornerRadiusFilterConverterStatics const&), CornerRadiusFilterConverter, ICornerRadiusFilterConverterStatics>([](ICornerRadiusFilterConverterStatics const& f) { return f.FilterProperty(); });
    }
    inline auto CornerRadiusFilterConverter::ScaleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICornerRadiusFilterConverterStatics const&), CornerRadiusFilterConverter, ICornerRadiusFilterConverterStatics>([](ICornerRadiusFilterConverterStatics const& f) { return f.ScaleProperty(); });
    }
    inline CornerRadiusToThicknessConverter::CornerRadiusToThicknessConverter() :
        CornerRadiusToThicknessConverter(impl::call_factory_cast<CornerRadiusToThicknessConverter(*)(winrt::Windows::Foundation::IActivationFactory const&), CornerRadiusToThicknessConverter>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<CornerRadiusToThicknessConverter>(); }))
    {
    }
    inline auto CornerRadiusToThicknessConverter::ConversionKindProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICornerRadiusToThicknessConverterStatics const&), CornerRadiusToThicknessConverter, ICornerRadiusToThicknessConverterStatics>([](ICornerRadiusToThicknessConverterStatics const& f) { return f.ConversionKindProperty(); });
    }
    inline auto CornerRadiusToThicknessConverter::MultiplierProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ICornerRadiusToThicknessConverterStatics const&), CornerRadiusToThicknessConverter, ICornerRadiusToThicknessConverterStatics>([](ICornerRadiusToThicknessConverterStatics const& f) { return f.MultiplierProperty(); });
    }
    inline DragCompletedEventArgs::DragCompletedEventArgs(double horizontalChange, double verticalChange, bool canceled)
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<DragCompletedEventArgs, IDragCompletedEventArgsFactory>([&](IDragCompletedEventArgsFactory const& f) { return f.CreateInstanceWithHorizontalChangeVerticalChangeAndCanceled(horizontalChange, verticalChange, canceled, baseInterface, innerInterface); });
    }
    inline DragDeltaEventArgs::DragDeltaEventArgs(double horizontalChange, double verticalChange)
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<DragDeltaEventArgs, IDragDeltaEventArgsFactory>([&](IDragDeltaEventArgsFactory const& f) { return f.CreateInstanceWithHorizontalChangeAndVerticalChange(horizontalChange, verticalChange, baseInterface, innerInterface); });
    }
    inline DragStartedEventArgs::DragStartedEventArgs(double horizontalOffset, double verticalOffset)
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<DragStartedEventArgs, IDragStartedEventArgsFactory>([&](IDragStartedEventArgsFactory const& f) { return f.CreateInstanceWithHorizontalOffsetAndVerticalOffset(horizontalOffset, verticalOffset, baseInterface, innerInterface); });
    }
    inline auto FlyoutBase::TargetProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFlyoutBaseStatics const&), FlyoutBase, IFlyoutBaseStatics>([](IFlyoutBaseStatics const& f) { return f.TargetProperty(); });
    }
    inline auto FlyoutBase::PlacementProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFlyoutBaseStatics const&), FlyoutBase, IFlyoutBaseStatics>([](IFlyoutBaseStatics const& f) { return f.PlacementProperty(); });
    }
    inline auto FlyoutBase::AllowFocusOnInteractionProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFlyoutBaseStatics const&), FlyoutBase, IFlyoutBaseStatics>([](IFlyoutBaseStatics const& f) { return f.AllowFocusOnInteractionProperty(); });
    }
    inline auto FlyoutBase::LightDismissOverlayModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFlyoutBaseStatics const&), FlyoutBase, IFlyoutBaseStatics>([](IFlyoutBaseStatics const& f) { return f.LightDismissOverlayModeProperty(); });
    }
    inline auto FlyoutBase::AllowFocusWhenDisabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFlyoutBaseStatics const&), FlyoutBase, IFlyoutBaseStatics>([](IFlyoutBaseStatics const& f) { return f.AllowFocusWhenDisabledProperty(); });
    }
    inline auto FlyoutBase::ShowModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFlyoutBaseStatics const&), FlyoutBase, IFlyoutBaseStatics>([](IFlyoutBaseStatics const& f) { return f.ShowModeProperty(); });
    }
    inline auto FlyoutBase::InputDevicePrefersPrimaryCommandsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFlyoutBaseStatics const&), FlyoutBase, IFlyoutBaseStatics>([](IFlyoutBaseStatics const& f) { return f.InputDevicePrefersPrimaryCommandsProperty(); });
    }
    inline auto FlyoutBase::AreOpenCloseAnimationsEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFlyoutBaseStatics const&), FlyoutBase, IFlyoutBaseStatics>([](IFlyoutBaseStatics const& f) { return f.AreOpenCloseAnimationsEnabledProperty(); });
    }
    inline auto FlyoutBase::ShouldConstrainToRootBoundsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFlyoutBaseStatics const&), FlyoutBase, IFlyoutBaseStatics>([](IFlyoutBaseStatics const& f) { return f.ShouldConstrainToRootBoundsProperty(); });
    }
    inline auto FlyoutBase::ElementSoundModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFlyoutBaseStatics const&), FlyoutBase, IFlyoutBaseStatics>([](IFlyoutBaseStatics const& f) { return f.ElementSoundModeProperty(); });
    }
    inline auto FlyoutBase::OverlayInputPassThroughElementProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFlyoutBaseStatics const&), FlyoutBase, IFlyoutBaseStatics>([](IFlyoutBaseStatics const& f) { return f.OverlayInputPassThroughElementProperty(); });
    }
    inline auto FlyoutBase::IsOpenProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFlyoutBaseStatics const&), FlyoutBase, IFlyoutBaseStatics>([](IFlyoutBaseStatics const& f) { return f.IsOpenProperty(); });
    }
    inline auto FlyoutBase::AttachedFlyoutProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFlyoutBaseStatics const&), FlyoutBase, IFlyoutBaseStatics>([](IFlyoutBaseStatics const& f) { return f.AttachedFlyoutProperty(); });
    }
    inline auto FlyoutBase::GetAttachedFlyout(winrt::Microsoft::UI::Xaml::FrameworkElement const& element)
    {
        return impl::call_factory<FlyoutBase, IFlyoutBaseStatics>([&](IFlyoutBaseStatics const& f) { return f.GetAttachedFlyout(element); });
    }
    inline auto FlyoutBase::SetAttachedFlyout(winrt::Microsoft::UI::Xaml::FrameworkElement const& element, winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase const& value)
    {
        impl::call_factory<FlyoutBase, IFlyoutBaseStatics>([&](IFlyoutBaseStatics const& f) { return f.SetAttachedFlyout(element, value); });
    }
    inline auto FlyoutBase::ShowAttachedFlyout(winrt::Microsoft::UI::Xaml::FrameworkElement const& flyoutOwner)
    {
        impl::call_factory<FlyoutBase, IFlyoutBaseStatics>([&](IFlyoutBaseStatics const& f) { return f.ShowAttachedFlyout(flyoutOwner); });
    }
    inline auto FlyoutBase::SystemBackdropProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IFlyoutBaseStatics2 const&), FlyoutBase, IFlyoutBaseStatics2>([](IFlyoutBaseStatics2 const& f) { return f.SystemBackdropProperty(); });
    }
    inline FlyoutShowOptions::FlyoutShowOptions()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<FlyoutShowOptions, IFlyoutShowOptionsFactory>([&](IFlyoutShowOptionsFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto GeneratorPositionHelper::FromIndexAndOffset(int32_t index, int32_t offset)
    {
        return impl::call_factory<GeneratorPositionHelper, IGeneratorPositionHelperStatics>([&](IGeneratorPositionHelperStatics const& f) { return f.FromIndexAndOffset(index, offset); });
    }
    inline GridViewItemPresenter::GridViewItemPresenter()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<GridViewItemPresenter, IGridViewItemPresenterFactory>([&](IGridViewItemPresenterFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto GridViewItemPresenter::SelectionCheckMarkVisualEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridViewItemPresenterStatics const&), GridViewItemPresenter, IGridViewItemPresenterStatics>([](IGridViewItemPresenterStatics const& f) { return f.SelectionCheckMarkVisualEnabledProperty(); });
    }
    inline auto GridViewItemPresenter::CheckHintBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridViewItemPresenterStatics const&), GridViewItemPresenter, IGridViewItemPresenterStatics>([](IGridViewItemPresenterStatics const& f) { return f.CheckHintBrushProperty(); });
    }
    inline auto GridViewItemPresenter::CheckSelectingBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridViewItemPresenterStatics const&), GridViewItemPresenter, IGridViewItemPresenterStatics>([](IGridViewItemPresenterStatics const& f) { return f.CheckSelectingBrushProperty(); });
    }
    inline auto GridViewItemPresenter::CheckBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridViewItemPresenterStatics const&), GridViewItemPresenter, IGridViewItemPresenterStatics>([](IGridViewItemPresenterStatics const& f) { return f.CheckBrushProperty(); });
    }
    inline auto GridViewItemPresenter::DragBackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridViewItemPresenterStatics const&), GridViewItemPresenter, IGridViewItemPresenterStatics>([](IGridViewItemPresenterStatics const& f) { return f.DragBackgroundProperty(); });
    }
    inline auto GridViewItemPresenter::DragForegroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridViewItemPresenterStatics const&), GridViewItemPresenter, IGridViewItemPresenterStatics>([](IGridViewItemPresenterStatics const& f) { return f.DragForegroundProperty(); });
    }
    inline auto GridViewItemPresenter::FocusBorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridViewItemPresenterStatics const&), GridViewItemPresenter, IGridViewItemPresenterStatics>([](IGridViewItemPresenterStatics const& f) { return f.FocusBorderBrushProperty(); });
    }
    inline auto GridViewItemPresenter::PlaceholderBackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridViewItemPresenterStatics const&), GridViewItemPresenter, IGridViewItemPresenterStatics>([](IGridViewItemPresenterStatics const& f) { return f.PlaceholderBackgroundProperty(); });
    }
    inline auto GridViewItemPresenter::PointerOverBackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridViewItemPresenterStatics const&), GridViewItemPresenter, IGridViewItemPresenterStatics>([](IGridViewItemPresenterStatics const& f) { return f.PointerOverBackgroundProperty(); });
    }
    inline auto GridViewItemPresenter::SelectedBackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridViewItemPresenterStatics const&), GridViewItemPresenter, IGridViewItemPresenterStatics>([](IGridViewItemPresenterStatics const& f) { return f.SelectedBackgroundProperty(); });
    }
    inline auto GridViewItemPresenter::SelectedForegroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridViewItemPresenterStatics const&), GridViewItemPresenter, IGridViewItemPresenterStatics>([](IGridViewItemPresenterStatics const& f) { return f.SelectedForegroundProperty(); });
    }
    inline auto GridViewItemPresenter::SelectedPointerOverBackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridViewItemPresenterStatics const&), GridViewItemPresenter, IGridViewItemPresenterStatics>([](IGridViewItemPresenterStatics const& f) { return f.SelectedPointerOverBackgroundProperty(); });
    }
    inline auto GridViewItemPresenter::SelectedPointerOverBorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridViewItemPresenterStatics const&), GridViewItemPresenter, IGridViewItemPresenterStatics>([](IGridViewItemPresenterStatics const& f) { return f.SelectedPointerOverBorderBrushProperty(); });
    }
    inline auto GridViewItemPresenter::SelectedBorderThicknessProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridViewItemPresenterStatics const&), GridViewItemPresenter, IGridViewItemPresenterStatics>([](IGridViewItemPresenterStatics const& f) { return f.SelectedBorderThicknessProperty(); });
    }
    inline auto GridViewItemPresenter::DisabledOpacityProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridViewItemPresenterStatics const&), GridViewItemPresenter, IGridViewItemPresenterStatics>([](IGridViewItemPresenterStatics const& f) { return f.DisabledOpacityProperty(); });
    }
    inline auto GridViewItemPresenter::DragOpacityProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridViewItemPresenterStatics const&), GridViewItemPresenter, IGridViewItemPresenterStatics>([](IGridViewItemPresenterStatics const& f) { return f.DragOpacityProperty(); });
    }
    inline auto GridViewItemPresenter::ReorderHintOffsetProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridViewItemPresenterStatics const&), GridViewItemPresenter, IGridViewItemPresenterStatics>([](IGridViewItemPresenterStatics const& f) { return f.ReorderHintOffsetProperty(); });
    }
    inline auto GridViewItemPresenter::GridViewItemPresenterHorizontalContentAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridViewItemPresenterStatics const&), GridViewItemPresenter, IGridViewItemPresenterStatics>([](IGridViewItemPresenterStatics const& f) { return f.GridViewItemPresenterHorizontalContentAlignmentProperty(); });
    }
    inline auto GridViewItemPresenter::GridViewItemPresenterVerticalContentAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridViewItemPresenterStatics const&), GridViewItemPresenter, IGridViewItemPresenterStatics>([](IGridViewItemPresenterStatics const& f) { return f.GridViewItemPresenterVerticalContentAlignmentProperty(); });
    }
    inline auto GridViewItemPresenter::GridViewItemPresenterPaddingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridViewItemPresenterStatics const&), GridViewItemPresenter, IGridViewItemPresenterStatics>([](IGridViewItemPresenterStatics const& f) { return f.GridViewItemPresenterPaddingProperty(); });
    }
    inline auto GridViewItemPresenter::PointerOverBackgroundMarginProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridViewItemPresenterStatics const&), GridViewItemPresenter, IGridViewItemPresenterStatics>([](IGridViewItemPresenterStatics const& f) { return f.PointerOverBackgroundMarginProperty(); });
    }
    inline auto GridViewItemPresenter::ContentMarginProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IGridViewItemPresenterStatics const&), GridViewItemPresenter, IGridViewItemPresenterStatics>([](IGridViewItemPresenterStatics const& f) { return f.ContentMarginProperty(); });
    }
    inline InfoBarPanel::InfoBarPanel()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<InfoBarPanel, IInfoBarPanelFactory>([&](IInfoBarPanelFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto InfoBarPanel::HorizontalOrientationPaddingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IInfoBarPanelStatics const&), InfoBarPanel, IInfoBarPanelStatics>([](IInfoBarPanelStatics const& f) { return f.HorizontalOrientationPaddingProperty(); });
    }
    inline auto InfoBarPanel::VerticalOrientationPaddingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IInfoBarPanelStatics const&), InfoBarPanel, IInfoBarPanelStatics>([](IInfoBarPanelStatics const& f) { return f.VerticalOrientationPaddingProperty(); });
    }
    inline auto InfoBarPanel::SetHorizontalOrientationMargin(winrt::Microsoft::UI::Xaml::DependencyObject const& object, winrt::Microsoft::UI::Xaml::Thickness const& value)
    {
        impl::call_factory<InfoBarPanel, IInfoBarPanelStatics>([&](IInfoBarPanelStatics const& f) { return f.SetHorizontalOrientationMargin(object, value); });
    }
    inline auto InfoBarPanel::GetHorizontalOrientationMargin(winrt::Microsoft::UI::Xaml::DependencyObject const& object)
    {
        return impl::call_factory<InfoBarPanel, IInfoBarPanelStatics>([&](IInfoBarPanelStatics const& f) { return f.GetHorizontalOrientationMargin(object); });
    }
    inline auto InfoBarPanel::HorizontalOrientationMarginProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IInfoBarPanelStatics const&), InfoBarPanel, IInfoBarPanelStatics>([](IInfoBarPanelStatics const& f) { return f.HorizontalOrientationMarginProperty(); });
    }
    inline auto InfoBarPanel::SetVerticalOrientationMargin(winrt::Microsoft::UI::Xaml::DependencyObject const& object, winrt::Microsoft::UI::Xaml::Thickness const& value)
    {
        impl::call_factory<InfoBarPanel, IInfoBarPanelStatics>([&](IInfoBarPanelStatics const& f) { return f.SetVerticalOrientationMargin(object, value); });
    }
    inline auto InfoBarPanel::GetVerticalOrientationMargin(winrt::Microsoft::UI::Xaml::DependencyObject const& object)
    {
        return impl::call_factory<InfoBarPanel, IInfoBarPanelStatics>([&](IInfoBarPanelStatics const& f) { return f.GetVerticalOrientationMargin(object); });
    }
    inline auto InfoBarPanel::VerticalOrientationMarginProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IInfoBarPanelStatics const&), InfoBarPanel, IInfoBarPanelStatics>([](IInfoBarPanelStatics const& f) { return f.VerticalOrientationMarginProperty(); });
    }
    inline JumpListItemBackgroundConverter::JumpListItemBackgroundConverter() :
        JumpListItemBackgroundConverter(impl::call_factory_cast<JumpListItemBackgroundConverter(*)(winrt::Windows::Foundation::IActivationFactory const&), JumpListItemBackgroundConverter>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<JumpListItemBackgroundConverter>(); }))
    {
    }
    inline auto JumpListItemBackgroundConverter::EnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IJumpListItemBackgroundConverterStatics const&), JumpListItemBackgroundConverter, IJumpListItemBackgroundConverterStatics>([](IJumpListItemBackgroundConverterStatics const& f) { return f.EnabledProperty(); });
    }
    inline auto JumpListItemBackgroundConverter::DisabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IJumpListItemBackgroundConverterStatics const&), JumpListItemBackgroundConverter, IJumpListItemBackgroundConverterStatics>([](IJumpListItemBackgroundConverterStatics const& f) { return f.DisabledProperty(); });
    }
    inline JumpListItemForegroundConverter::JumpListItemForegroundConverter() :
        JumpListItemForegroundConverter(impl::call_factory_cast<JumpListItemForegroundConverter(*)(winrt::Windows::Foundation::IActivationFactory const&), JumpListItemForegroundConverter>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<JumpListItemForegroundConverter>(); }))
    {
    }
    inline auto JumpListItemForegroundConverter::EnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IJumpListItemForegroundConverterStatics const&), JumpListItemForegroundConverter, IJumpListItemForegroundConverterStatics>([](IJumpListItemForegroundConverterStatics const& f) { return f.EnabledProperty(); });
    }
    inline auto JumpListItemForegroundConverter::DisabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IJumpListItemForegroundConverterStatics const&), JumpListItemForegroundConverter, IJumpListItemForegroundConverterStatics>([](IJumpListItemForegroundConverterStatics const& f) { return f.DisabledProperty(); });
    }
    inline auto LayoutInformation::GetLayoutExceptionElement(winrt::Windows::Foundation::IInspectable const& dispatcher)
    {
        return impl::call_factory<LayoutInformation, ILayoutInformationStatics>([&](ILayoutInformationStatics const& f) { return f.GetLayoutExceptionElement(dispatcher); });
    }
    inline auto LayoutInformation::GetLayoutSlot(winrt::Microsoft::UI::Xaml::FrameworkElement const& element)
    {
        return impl::call_factory<LayoutInformation, ILayoutInformationStatics>([&](ILayoutInformationStatics const& f) { return f.GetLayoutSlot(element); });
    }
    inline auto LayoutInformation::GetAvailableSize(winrt::Microsoft::UI::Xaml::UIElement const& element)
    {
        return impl::call_factory<LayoutInformation, ILayoutInformationStatics>([&](ILayoutInformationStatics const& f) { return f.GetAvailableSize(element); });
    }
    inline ListViewItemPresenter::ListViewItemPresenter()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ListViewItemPresenter, IListViewItemPresenterFactory>([&](IListViewItemPresenterFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto ListViewItemPresenter::SelectionCheckMarkVisualEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.SelectionCheckMarkVisualEnabledProperty(); });
    }
    inline auto ListViewItemPresenter::CheckHintBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.CheckHintBrushProperty(); });
    }
    inline auto ListViewItemPresenter::CheckSelectingBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.CheckSelectingBrushProperty(); });
    }
    inline auto ListViewItemPresenter::CheckBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.CheckBrushProperty(); });
    }
    inline auto ListViewItemPresenter::DragBackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.DragBackgroundProperty(); });
    }
    inline auto ListViewItemPresenter::DragForegroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.DragForegroundProperty(); });
    }
    inline auto ListViewItemPresenter::FocusBorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.FocusBorderBrushProperty(); });
    }
    inline auto ListViewItemPresenter::PlaceholderBackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.PlaceholderBackgroundProperty(); });
    }
    inline auto ListViewItemPresenter::PointerOverBackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.PointerOverBackgroundProperty(); });
    }
    inline auto ListViewItemPresenter::SelectedBackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.SelectedBackgroundProperty(); });
    }
    inline auto ListViewItemPresenter::SelectedForegroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.SelectedForegroundProperty(); });
    }
    inline auto ListViewItemPresenter::SelectedPointerOverBackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.SelectedPointerOverBackgroundProperty(); });
    }
    inline auto ListViewItemPresenter::SelectedPointerOverBorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.SelectedPointerOverBorderBrushProperty(); });
    }
    inline auto ListViewItemPresenter::SelectedBorderThicknessProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.SelectedBorderThicknessProperty(); });
    }
    inline auto ListViewItemPresenter::DisabledOpacityProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.DisabledOpacityProperty(); });
    }
    inline auto ListViewItemPresenter::DragOpacityProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.DragOpacityProperty(); });
    }
    inline auto ListViewItemPresenter::ReorderHintOffsetProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.ReorderHintOffsetProperty(); });
    }
    inline auto ListViewItemPresenter::ListViewItemPresenterHorizontalContentAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.ListViewItemPresenterHorizontalContentAlignmentProperty(); });
    }
    inline auto ListViewItemPresenter::ListViewItemPresenterVerticalContentAlignmentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.ListViewItemPresenterVerticalContentAlignmentProperty(); });
    }
    inline auto ListViewItemPresenter::ListViewItemPresenterPaddingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.ListViewItemPresenterPaddingProperty(); });
    }
    inline auto ListViewItemPresenter::PointerOverBackgroundMarginProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.PointerOverBackgroundMarginProperty(); });
    }
    inline auto ListViewItemPresenter::ContentMarginProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.ContentMarginProperty(); });
    }
    inline auto ListViewItemPresenter::SelectedPressedBackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.SelectedPressedBackgroundProperty(); });
    }
    inline auto ListViewItemPresenter::PressedBackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.PressedBackgroundProperty(); });
    }
    inline auto ListViewItemPresenter::CheckBoxBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.CheckBoxBrushProperty(); });
    }
    inline auto ListViewItemPresenter::FocusSecondaryBorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.FocusSecondaryBorderBrushProperty(); });
    }
    inline auto ListViewItemPresenter::CheckModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.CheckModeProperty(); });
    }
    inline auto ListViewItemPresenter::PointerOverForegroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.PointerOverForegroundProperty(); });
    }
    inline auto ListViewItemPresenter::RevealBackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.RevealBackgroundProperty(); });
    }
    inline auto ListViewItemPresenter::RevealBorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.RevealBorderBrushProperty(); });
    }
    inline auto ListViewItemPresenter::RevealBorderThicknessProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.RevealBorderThicknessProperty(); });
    }
    inline auto ListViewItemPresenter::RevealBackgroundShowsAboveContentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.RevealBackgroundShowsAboveContentProperty(); });
    }
    inline auto ListViewItemPresenter::SelectedDisabledBackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.SelectedDisabledBackgroundProperty(); });
    }
    inline auto ListViewItemPresenter::CheckPressedBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.CheckPressedBrushProperty(); });
    }
    inline auto ListViewItemPresenter::CheckDisabledBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.CheckDisabledBrushProperty(); });
    }
    inline auto ListViewItemPresenter::CheckBoxPointerOverBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.CheckBoxPointerOverBrushProperty(); });
    }
    inline auto ListViewItemPresenter::CheckBoxPressedBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.CheckBoxPressedBrushProperty(); });
    }
    inline auto ListViewItemPresenter::CheckBoxDisabledBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.CheckBoxDisabledBrushProperty(); });
    }
    inline auto ListViewItemPresenter::CheckBoxSelectedBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.CheckBoxSelectedBrushProperty(); });
    }
    inline auto ListViewItemPresenter::CheckBoxSelectedPointerOverBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.CheckBoxSelectedPointerOverBrushProperty(); });
    }
    inline auto ListViewItemPresenter::CheckBoxSelectedPressedBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.CheckBoxSelectedPressedBrushProperty(); });
    }
    inline auto ListViewItemPresenter::CheckBoxSelectedDisabledBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.CheckBoxSelectedDisabledBrushProperty(); });
    }
    inline auto ListViewItemPresenter::CheckBoxBorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.CheckBoxBorderBrushProperty(); });
    }
    inline auto ListViewItemPresenter::CheckBoxPointerOverBorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.CheckBoxPointerOverBorderBrushProperty(); });
    }
    inline auto ListViewItemPresenter::CheckBoxPressedBorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.CheckBoxPressedBorderBrushProperty(); });
    }
    inline auto ListViewItemPresenter::CheckBoxDisabledBorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.CheckBoxDisabledBorderBrushProperty(); });
    }
    inline auto ListViewItemPresenter::CheckBoxCornerRadiusProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.CheckBoxCornerRadiusProperty(); });
    }
    inline auto ListViewItemPresenter::SelectionIndicatorCornerRadiusProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.SelectionIndicatorCornerRadiusProperty(); });
    }
    inline auto ListViewItemPresenter::SelectionIndicatorVisualEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.SelectionIndicatorVisualEnabledProperty(); });
    }
    inline auto ListViewItemPresenter::SelectionIndicatorModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.SelectionIndicatorModeProperty(); });
    }
    inline auto ListViewItemPresenter::SelectionIndicatorBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.SelectionIndicatorBrushProperty(); });
    }
    inline auto ListViewItemPresenter::SelectionIndicatorPointerOverBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.SelectionIndicatorPointerOverBrushProperty(); });
    }
    inline auto ListViewItemPresenter::SelectionIndicatorPressedBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.SelectionIndicatorPressedBrushProperty(); });
    }
    inline auto ListViewItemPresenter::SelectionIndicatorDisabledBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.SelectionIndicatorDisabledBrushProperty(); });
    }
    inline auto ListViewItemPresenter::SelectedBorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.SelectedBorderBrushProperty(); });
    }
    inline auto ListViewItemPresenter::SelectedPressedBorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.SelectedPressedBorderBrushProperty(); });
    }
    inline auto ListViewItemPresenter::SelectedDisabledBorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.SelectedDisabledBorderBrushProperty(); });
    }
    inline auto ListViewItemPresenter::SelectedInnerBorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.SelectedInnerBorderBrushProperty(); });
    }
    inline auto ListViewItemPresenter::PointerOverBorderBrushProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IListViewItemPresenterStatics const&), ListViewItemPresenter, IListViewItemPresenterStatics>([](IListViewItemPresenterStatics const& f) { return f.PointerOverBorderBrushProperty(); });
    }
    inline auto LoopingSelector::ShouldLoopProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ILoopingSelectorStatics const&), LoopingSelector, ILoopingSelectorStatics>([](ILoopingSelectorStatics const& f) { return f.ShouldLoopProperty(); });
    }
    inline auto LoopingSelector::ItemsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ILoopingSelectorStatics const&), LoopingSelector, ILoopingSelectorStatics>([](ILoopingSelectorStatics const& f) { return f.ItemsProperty(); });
    }
    inline auto LoopingSelector::SelectedIndexProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ILoopingSelectorStatics const&), LoopingSelector, ILoopingSelectorStatics>([](ILoopingSelectorStatics const& f) { return f.SelectedIndexProperty(); });
    }
    inline auto LoopingSelector::SelectedItemProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ILoopingSelectorStatics const&), LoopingSelector, ILoopingSelectorStatics>([](ILoopingSelectorStatics const& f) { return f.SelectedItemProperty(); });
    }
    inline auto LoopingSelector::ItemWidthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ILoopingSelectorStatics const&), LoopingSelector, ILoopingSelectorStatics>([](ILoopingSelectorStatics const& f) { return f.ItemWidthProperty(); });
    }
    inline auto LoopingSelector::ItemHeightProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ILoopingSelectorStatics const&), LoopingSelector, ILoopingSelectorStatics>([](ILoopingSelectorStatics const& f) { return f.ItemHeightProperty(); });
    }
    inline auto LoopingSelector::ItemTemplateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ILoopingSelectorStatics const&), LoopingSelector, ILoopingSelectorStatics>([](ILoopingSelectorStatics const& f) { return f.ItemTemplateProperty(); });
    }
    inline MonochromaticOverlayPresenter::MonochromaticOverlayPresenter()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<MonochromaticOverlayPresenter, IMonochromaticOverlayPresenterFactory>([&](IMonochromaticOverlayPresenterFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto MonochromaticOverlayPresenter::SourceElementProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMonochromaticOverlayPresenterStatics const&), MonochromaticOverlayPresenter, IMonochromaticOverlayPresenterStatics>([](IMonochromaticOverlayPresenterStatics const& f) { return f.SourceElementProperty(); });
    }
    inline auto MonochromaticOverlayPresenter::ReplacementColorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IMonochromaticOverlayPresenterStatics const&), MonochromaticOverlayPresenter, IMonochromaticOverlayPresenterStatics>([](IMonochromaticOverlayPresenterStatics const& f) { return f.ReplacementColorProperty(); });
    }
    inline NavigationViewItemPresenter::NavigationViewItemPresenter()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<NavigationViewItemPresenter, INavigationViewItemPresenterFactory>([&](INavigationViewItemPresenterFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto NavigationViewItemPresenter::IconProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewItemPresenterStatics const&), NavigationViewItemPresenter, INavigationViewItemPresenterStatics>([](INavigationViewItemPresenterStatics const& f) { return f.IconProperty(); });
    }
    inline auto NavigationViewItemPresenter::TemplateSettingsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewItemPresenterStatics const&), NavigationViewItemPresenter, INavigationViewItemPresenterStatics>([](INavigationViewItemPresenterStatics const& f) { return f.TemplateSettingsProperty(); });
    }
    inline auto NavigationViewItemPresenter::InfoBadgeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewItemPresenterStatics2 const&), NavigationViewItemPresenter, INavigationViewItemPresenterStatics2>([](INavigationViewItemPresenterStatics2 const& f) { return f.InfoBadgeProperty(); });
    }
    inline NavigationViewItemPresenterTemplateSettings::NavigationViewItemPresenterTemplateSettings()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<NavigationViewItemPresenterTemplateSettings, INavigationViewItemPresenterTemplateSettingsFactory>([&](INavigationViewItemPresenterTemplateSettingsFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto NavigationViewItemPresenterTemplateSettings::IconWidthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewItemPresenterTemplateSettingsStatics const&), NavigationViewItemPresenterTemplateSettings, INavigationViewItemPresenterTemplateSettingsStatics>([](INavigationViewItemPresenterTemplateSettingsStatics const& f) { return f.IconWidthProperty(); });
    }
    inline auto NavigationViewItemPresenterTemplateSettings::SmallerIconWidthProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(INavigationViewItemPresenterTemplateSettingsStatics const&), NavigationViewItemPresenterTemplateSettings, INavigationViewItemPresenterTemplateSettingsStatics>([](INavigationViewItemPresenterTemplateSettingsStatics const& f) { return f.SmallerIconWidthProperty(); });
    }
    inline auto PickerFlyoutBase::TitleProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPickerFlyoutBaseStatics const&), PickerFlyoutBase, IPickerFlyoutBaseStatics>([](IPickerFlyoutBaseStatics const& f) { return f.TitleProperty(); });
    }
    inline auto PickerFlyoutBase::GetTitle(winrt::Microsoft::UI::Xaml::DependencyObject const& element)
    {
        return impl::call_factory<PickerFlyoutBase, IPickerFlyoutBaseStatics>([&](IPickerFlyoutBaseStatics const& f) { return f.GetTitle(element); });
    }
    inline auto PickerFlyoutBase::SetTitle(winrt::Microsoft::UI::Xaml::DependencyObject const& element, param::hstring const& value)
    {
        impl::call_factory<PickerFlyoutBase, IPickerFlyoutBaseStatics>([&](IPickerFlyoutBaseStatics const& f) { return f.SetTitle(element, value); });
    }
    inline PivotHeaderItem::PivotHeaderItem()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<PivotHeaderItem, IPivotHeaderItemFactory>([&](IPivotHeaderItemFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline PivotHeaderPanel::PivotHeaderPanel() :
        PivotHeaderPanel(impl::call_factory_cast<PivotHeaderPanel(*)(winrt::Windows::Foundation::IActivationFactory const&), PivotHeaderPanel>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<PivotHeaderPanel>(); }))
    {
    }
    inline PivotPanel::PivotPanel() :
        PivotPanel(impl::call_factory_cast<PivotPanel(*)(winrt::Windows::Foundation::IActivationFactory const&), PivotPanel>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<PivotPanel>(); }))
    {
    }
    inline Popup::Popup() :
        Popup(impl::call_factory_cast<Popup(*)(winrt::Windows::Foundation::IActivationFactory const&), Popup>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<Popup>(); }))
    {
    }
    inline auto Popup::ChildProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPopupStatics const&), Popup, IPopupStatics>([](IPopupStatics const& f) { return f.ChildProperty(); });
    }
    inline auto Popup::IsOpenProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPopupStatics const&), Popup, IPopupStatics>([](IPopupStatics const& f) { return f.IsOpenProperty(); });
    }
    inline auto Popup::HorizontalOffsetProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPopupStatics const&), Popup, IPopupStatics>([](IPopupStatics const& f) { return f.HorizontalOffsetProperty(); });
    }
    inline auto Popup::VerticalOffsetProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPopupStatics const&), Popup, IPopupStatics>([](IPopupStatics const& f) { return f.VerticalOffsetProperty(); });
    }
    inline auto Popup::ChildTransitionsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPopupStatics const&), Popup, IPopupStatics>([](IPopupStatics const& f) { return f.ChildTransitionsProperty(); });
    }
    inline auto Popup::IsLightDismissEnabledProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPopupStatics const&), Popup, IPopupStatics>([](IPopupStatics const& f) { return f.IsLightDismissEnabledProperty(); });
    }
    inline auto Popup::LightDismissOverlayModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPopupStatics const&), Popup, IPopupStatics>([](IPopupStatics const& f) { return f.LightDismissOverlayModeProperty(); });
    }
    inline auto Popup::ShouldConstrainToRootBoundsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPopupStatics const&), Popup, IPopupStatics>([](IPopupStatics const& f) { return f.ShouldConstrainToRootBoundsProperty(); });
    }
    inline auto Popup::PlacementTargetProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPopupStatics2 const&), Popup, IPopupStatics2>([](IPopupStatics2 const& f) { return f.PlacementTargetProperty(); });
    }
    inline auto Popup::DesiredPlacementProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPopupStatics2 const&), Popup, IPopupStatics2>([](IPopupStatics2 const& f) { return f.DesiredPlacementProperty(); });
    }
    inline auto Popup::SystemBackdropProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IPopupStatics3 const&), Popup, IPopupStatics3>([](IPopupStatics3 const& f) { return f.SystemBackdropProperty(); });
    }
    inline auto RangeBase::MinimumProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRangeBaseStatics const&), RangeBase, IRangeBaseStatics>([](IRangeBaseStatics const& f) { return f.MinimumProperty(); });
    }
    inline auto RangeBase::MaximumProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRangeBaseStatics const&), RangeBase, IRangeBaseStatics>([](IRangeBaseStatics const& f) { return f.MaximumProperty(); });
    }
    inline auto RangeBase::SmallChangeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRangeBaseStatics const&), RangeBase, IRangeBaseStatics>([](IRangeBaseStatics const& f) { return f.SmallChangeProperty(); });
    }
    inline auto RangeBase::LargeChangeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRangeBaseStatics const&), RangeBase, IRangeBaseStatics>([](IRangeBaseStatics const& f) { return f.LargeChangeProperty(); });
    }
    inline auto RangeBase::ValueProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRangeBaseStatics const&), RangeBase, IRangeBaseStatics>([](IRangeBaseStatics const& f) { return f.ValueProperty(); });
    }
    inline RepeatButton::RepeatButton() :
        RepeatButton(impl::call_factory_cast<RepeatButton(*)(winrt::Windows::Foundation::IActivationFactory const&), RepeatButton>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<RepeatButton>(); }))
    {
    }
    inline auto RepeatButton::DelayProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRepeatButtonStatics const&), RepeatButton, IRepeatButtonStatics>([](IRepeatButtonStatics const& f) { return f.DelayProperty(); });
    }
    inline auto RepeatButton::IntervalProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IRepeatButtonStatics const&), RepeatButton, IRepeatButtonStatics>([](IRepeatButtonStatics const& f) { return f.IntervalProperty(); });
    }
    inline RepeatedScrollSnapPoint::RepeatedScrollSnapPoint(double offset, double interval, double start, double end, winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollSnapPointsAlignment const& alignment)
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<RepeatedScrollSnapPoint, IRepeatedScrollSnapPointFactory>([&](IRepeatedScrollSnapPointFactory const& f) { return f.CreateInstance(offset, interval, start, end, alignment, baseInterface, innerInterface); });
    }
    inline RepeatedZoomSnapPoint::RepeatedZoomSnapPoint(double offset, double interval, double start, double end)
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<RepeatedZoomSnapPoint, IRepeatedZoomSnapPointFactory>([&](IRepeatedZoomSnapPointFactory const& f) { return f.CreateInstance(offset, interval, start, end, baseInterface, innerInterface); });
    }
    inline ScrollBar::ScrollBar() :
        ScrollBar(impl::call_factory_cast<ScrollBar(*)(winrt::Windows::Foundation::IActivationFactory const&), ScrollBar>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<ScrollBar>(); }))
    {
    }
    inline auto ScrollBar::OrientationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollBarStatics const&), ScrollBar, IScrollBarStatics>([](IScrollBarStatics const& f) { return f.OrientationProperty(); });
    }
    inline auto ScrollBar::ViewportSizeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollBarStatics const&), ScrollBar, IScrollBarStatics>([](IScrollBarStatics const& f) { return f.ViewportSizeProperty(); });
    }
    inline auto ScrollBar::IndicatorModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollBarStatics const&), ScrollBar, IScrollBarStatics>([](IScrollBarStatics const& f) { return f.IndicatorModeProperty(); });
    }
    inline ScrollControllerAddScrollVelocityRequestedEventArgs::ScrollControllerAddScrollVelocityRequestedEventArgs(float offsetVelocity, winrt::Windows::Foundation::IReference<float> const& inertiaDecayRate) :
        ScrollControllerAddScrollVelocityRequestedEventArgs(impl::call_factory<ScrollControllerAddScrollVelocityRequestedEventArgs, IScrollControllerAddScrollVelocityRequestedEventArgsFactory>([&](IScrollControllerAddScrollVelocityRequestedEventArgsFactory const& f) { return f.CreateInstance(offsetVelocity, inertiaDecayRate); }))
    {
    }
    inline ScrollControllerPanRequestedEventArgs::ScrollControllerPanRequestedEventArgs(winrt::Microsoft::UI::Input::PointerPoint const& pointerPoint) :
        ScrollControllerPanRequestedEventArgs(impl::call_factory<ScrollControllerPanRequestedEventArgs, IScrollControllerPanRequestedEventArgsFactory>([&](IScrollControllerPanRequestedEventArgsFactory const& f) { return f.CreateInstance(pointerPoint); }))
    {
    }
    inline ScrollControllerScrollByRequestedEventArgs::ScrollControllerScrollByRequestedEventArgs(double offsetDelta, winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollOptions const& options) :
        ScrollControllerScrollByRequestedEventArgs(impl::call_factory<ScrollControllerScrollByRequestedEventArgs, IScrollControllerScrollByRequestedEventArgsFactory>([&](IScrollControllerScrollByRequestedEventArgsFactory const& f) { return f.CreateInstance(offsetDelta, options); }))
    {
    }
    inline ScrollControllerScrollToRequestedEventArgs::ScrollControllerScrollToRequestedEventArgs(double offset, winrt::Microsoft::UI::Xaml::Controls::ScrollingScrollOptions const& options) :
        ScrollControllerScrollToRequestedEventArgs(impl::call_factory<ScrollControllerScrollToRequestedEventArgs, IScrollControllerScrollToRequestedEventArgsFactory>([&](IScrollControllerScrollToRequestedEventArgsFactory const& f) { return f.CreateInstance(offset, options); }))
    {
    }
    inline ScrollEventArgs::ScrollEventArgs() :
        ScrollEventArgs(impl::call_factory_cast<ScrollEventArgs(*)(winrt::Windows::Foundation::IActivationFactory const&), ScrollEventArgs>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<ScrollEventArgs>(); }))
    {
    }
    inline ScrollPresenter::ScrollPresenter()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ScrollPresenter, IScrollPresenterFactory>([&](IScrollPresenterFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto ScrollPresenter::BackgroundProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollPresenterStatics const&), ScrollPresenter, IScrollPresenterStatics>([](IScrollPresenterStatics const& f) { return f.BackgroundProperty(); });
    }
    inline auto ScrollPresenter::ContentProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollPresenterStatics const&), ScrollPresenter, IScrollPresenterStatics>([](IScrollPresenterStatics const& f) { return f.ContentProperty(); });
    }
    inline auto ScrollPresenter::ContentOrientationProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollPresenterStatics const&), ScrollPresenter, IScrollPresenterStatics>([](IScrollPresenterStatics const& f) { return f.ContentOrientationProperty(); });
    }
    inline auto ScrollPresenter::HorizontalScrollChainModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollPresenterStatics const&), ScrollPresenter, IScrollPresenterStatics>([](IScrollPresenterStatics const& f) { return f.HorizontalScrollChainModeProperty(); });
    }
    inline auto ScrollPresenter::VerticalScrollChainModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollPresenterStatics const&), ScrollPresenter, IScrollPresenterStatics>([](IScrollPresenterStatics const& f) { return f.VerticalScrollChainModeProperty(); });
    }
    inline auto ScrollPresenter::HorizontalScrollRailModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollPresenterStatics const&), ScrollPresenter, IScrollPresenterStatics>([](IScrollPresenterStatics const& f) { return f.HorizontalScrollRailModeProperty(); });
    }
    inline auto ScrollPresenter::VerticalScrollRailModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollPresenterStatics const&), ScrollPresenter, IScrollPresenterStatics>([](IScrollPresenterStatics const& f) { return f.VerticalScrollRailModeProperty(); });
    }
    inline auto ScrollPresenter::HorizontalScrollModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollPresenterStatics const&), ScrollPresenter, IScrollPresenterStatics>([](IScrollPresenterStatics const& f) { return f.HorizontalScrollModeProperty(); });
    }
    inline auto ScrollPresenter::VerticalScrollModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollPresenterStatics const&), ScrollPresenter, IScrollPresenterStatics>([](IScrollPresenterStatics const& f) { return f.VerticalScrollModeProperty(); });
    }
    inline auto ScrollPresenter::ComputedHorizontalScrollModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollPresenterStatics const&), ScrollPresenter, IScrollPresenterStatics>([](IScrollPresenterStatics const& f) { return f.ComputedHorizontalScrollModeProperty(); });
    }
    inline auto ScrollPresenter::ComputedVerticalScrollModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollPresenterStatics const&), ScrollPresenter, IScrollPresenterStatics>([](IScrollPresenterStatics const& f) { return f.ComputedVerticalScrollModeProperty(); });
    }
    inline auto ScrollPresenter::ZoomChainModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollPresenterStatics const&), ScrollPresenter, IScrollPresenterStatics>([](IScrollPresenterStatics const& f) { return f.ZoomChainModeProperty(); });
    }
    inline auto ScrollPresenter::ZoomModeProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollPresenterStatics const&), ScrollPresenter, IScrollPresenterStatics>([](IScrollPresenterStatics const& f) { return f.ZoomModeProperty(); });
    }
    inline auto ScrollPresenter::IgnoredInputKindsProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollPresenterStatics const&), ScrollPresenter, IScrollPresenterStatics>([](IScrollPresenterStatics const& f) { return f.IgnoredInputKindsProperty(); });
    }
    inline auto ScrollPresenter::MinZoomFactorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollPresenterStatics const&), ScrollPresenter, IScrollPresenterStatics>([](IScrollPresenterStatics const& f) { return f.MinZoomFactorProperty(); });
    }
    inline auto ScrollPresenter::MaxZoomFactorProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollPresenterStatics const&), ScrollPresenter, IScrollPresenterStatics>([](IScrollPresenterStatics const& f) { return f.MaxZoomFactorProperty(); });
    }
    inline auto ScrollPresenter::HorizontalAnchorRatioProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollPresenterStatics const&), ScrollPresenter, IScrollPresenterStatics>([](IScrollPresenterStatics const& f) { return f.HorizontalAnchorRatioProperty(); });
    }
    inline auto ScrollPresenter::VerticalAnchorRatioProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IScrollPresenterStatics const&), ScrollPresenter, IScrollPresenterStatics>([](IScrollPresenterStatics const& f) { return f.VerticalAnchorRatioProperty(); });
    }
    inline ScrollSnapPoint::ScrollSnapPoint(double snapPointValue, winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollSnapPointsAlignment const& alignment)
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ScrollSnapPoint, IScrollSnapPointFactory>([&](IScrollSnapPointFactory const& f) { return f.CreateInstance(snapPointValue, alignment, baseInterface, innerInterface); });
    }
    inline auto Selector::SelectedIndexProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISelectorStatics const&), Selector, ISelectorStatics>([](ISelectorStatics const& f) { return f.SelectedIndexProperty(); });
    }
    inline auto Selector::SelectedItemProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISelectorStatics const&), Selector, ISelectorStatics>([](ISelectorStatics const& f) { return f.SelectedItemProperty(); });
    }
    inline auto Selector::SelectedValueProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISelectorStatics const&), Selector, ISelectorStatics>([](ISelectorStatics const& f) { return f.SelectedValueProperty(); });
    }
    inline auto Selector::SelectedValuePathProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISelectorStatics const&), Selector, ISelectorStatics>([](ISelectorStatics const& f) { return f.SelectedValuePathProperty(); });
    }
    inline auto Selector::IsSynchronizedWithCurrentItemProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISelectorStatics const&), Selector, ISelectorStatics>([](ISelectorStatics const& f) { return f.IsSynchronizedWithCurrentItemProperty(); });
    }
    inline auto Selector::GetIsSelectionActive(winrt::Microsoft::UI::Xaml::DependencyObject const& element)
    {
        return impl::call_factory<Selector, ISelectorStatics>([&](ISelectorStatics const& f) { return f.GetIsSelectionActive(element); });
    }
    inline auto SelectorItem::IsSelectedProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ISelectorItemStatics const&), SelectorItem, ISelectorItemStatics>([](ISelectorItemStatics const& f) { return f.IsSelectedProperty(); });
    }
    inline TabViewListView::TabViewListView()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<TabViewListView, ITabViewListViewFactory>([&](ITabViewListViewFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline Thumb::Thumb() :
        Thumb(impl::call_factory_cast<Thumb(*)(winrt::Windows::Foundation::IActivationFactory const&), Thumb>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<Thumb>(); }))
    {
    }
    inline auto Thumb::IsDraggingProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IThumbStatics const&), Thumb, IThumbStatics>([](IThumbStatics const& f) { return f.IsDraggingProperty(); });
    }
    inline TickBar::TickBar() :
        TickBar(impl::call_factory_cast<TickBar(*)(winrt::Windows::Foundation::IActivationFactory const&), TickBar>([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance<TickBar>(); }))
    {
    }
    inline auto TickBar::FillProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(ITickBarStatics const&), TickBar, ITickBarStatics>([](ITickBarStatics const& f) { return f.FillProperty(); });
    }
    inline ToggleButton::ToggleButton()
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ToggleButton, IToggleButtonFactory>([&](IToggleButtonFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); });
    }
    inline auto ToggleButton::IsCheckedProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IToggleButtonStatics const&), ToggleButton, IToggleButtonStatics>([](IToggleButtonStatics const& f) { return f.IsCheckedProperty(); });
    }
    inline auto ToggleButton::IsThreeStateProperty()
    {
        return impl::call_factory_cast<winrt::Microsoft::UI::Xaml::DependencyProperty(*)(IToggleButtonStatics const&), ToggleButton, IToggleButtonStatics>([](IToggleButtonStatics const& f) { return f.IsThreeStateProperty(); });
    }
    inline ZoomSnapPoint::ZoomSnapPoint(double snapPointValue)
    {
        winrt::Windows::Foundation::IInspectable baseInterface, innerInterface;
        *this = impl::call_factory<ZoomSnapPoint, IZoomSnapPointFactory>([&](IZoomSnapPointFactory const& f) { return f.CreateInstance(snapPointValue, baseInterface, innerInterface); });
    }
    template <typename L> DragCompletedEventHandler::DragCompletedEventHandler(L handler) :
        DragCompletedEventHandler(impl::make_delegate<DragCompletedEventHandler>(std::forward<L>(handler)))
    {
    }
    template <typename F> DragCompletedEventHandler::DragCompletedEventHandler(F* handler) :
        DragCompletedEventHandler([=](auto&&... args) { return handler(args...); })
    {
    }
    template <typename O, typename M> DragCompletedEventHandler::DragCompletedEventHandler(O* object, M method) :
        DragCompletedEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); })
    {
    }
    template <typename O, typename M> DragCompletedEventHandler::DragCompletedEventHandler(com_ptr<O>&& object, M method) :
        DragCompletedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> DragCompletedEventHandler::DragCompletedEventHandler(weak_ref<O>&& object, LM&& lambda_or_method) :
        DragCompletedEventHandler([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> DragCompletedEventHandler::DragCompletedEventHandler(std::shared_ptr<O>&& object, M method) :
        DragCompletedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> DragCompletedEventHandler::DragCompletedEventHandler(std::weak_ptr<O>&& object, LM&& lambda_or_method) :
        DragCompletedEventHandler([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 DragCompletedEventHandler::operator()(winrt::Windows::Foundation::IInspectable const& sender, winrt::Microsoft::UI::Xaml::Controls::Primitives::DragCompletedEventArgs const& e) const
    {
        check_hresult((*(impl::abi_t<DragCompletedEventHandler>**)this)->Invoke(*(void**)(&sender), *(void**)(&e)));
    }
    template <typename L> DragDeltaEventHandler::DragDeltaEventHandler(L handler) :
        DragDeltaEventHandler(impl::make_delegate<DragDeltaEventHandler>(std::forward<L>(handler)))
    {
    }
    template <typename F> DragDeltaEventHandler::DragDeltaEventHandler(F* handler) :
        DragDeltaEventHandler([=](auto&&... args) { return handler(args...); })
    {
    }
    template <typename O, typename M> DragDeltaEventHandler::DragDeltaEventHandler(O* object, M method) :
        DragDeltaEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); })
    {
    }
    template <typename O, typename M> DragDeltaEventHandler::DragDeltaEventHandler(com_ptr<O>&& object, M method) :
        DragDeltaEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> DragDeltaEventHandler::DragDeltaEventHandler(weak_ref<O>&& object, LM&& lambda_or_method) :
        DragDeltaEventHandler([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> DragDeltaEventHandler::DragDeltaEventHandler(std::shared_ptr<O>&& object, M method) :
        DragDeltaEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> DragDeltaEventHandler::DragDeltaEventHandler(std::weak_ptr<O>&& object, LM&& lambda_or_method) :
        DragDeltaEventHandler([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 DragDeltaEventHandler::operator()(winrt::Windows::Foundation::IInspectable const& sender, winrt::Microsoft::UI::Xaml::Controls::Primitives::DragDeltaEventArgs const& e) const
    {
        check_hresult((*(impl::abi_t<DragDeltaEventHandler>**)this)->Invoke(*(void**)(&sender), *(void**)(&e)));
    }
    template <typename L> DragStartedEventHandler::DragStartedEventHandler(L handler) :
        DragStartedEventHandler(impl::make_delegate<DragStartedEventHandler>(std::forward<L>(handler)))
    {
    }
    template <typename F> DragStartedEventHandler::DragStartedEventHandler(F* handler) :
        DragStartedEventHandler([=](auto&&... args) { return handler(args...); })
    {
    }
    template <typename O, typename M> DragStartedEventHandler::DragStartedEventHandler(O* object, M method) :
        DragStartedEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); })
    {
    }
    template <typename O, typename M> DragStartedEventHandler::DragStartedEventHandler(com_ptr<O>&& object, M method) :
        DragStartedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> DragStartedEventHandler::DragStartedEventHandler(weak_ref<O>&& object, LM&& lambda_or_method) :
        DragStartedEventHandler([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> DragStartedEventHandler::DragStartedEventHandler(std::shared_ptr<O>&& object, M method) :
        DragStartedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> DragStartedEventHandler::DragStartedEventHandler(std::weak_ptr<O>&& object, LM&& lambda_or_method) :
        DragStartedEventHandler([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 DragStartedEventHandler::operator()(winrt::Windows::Foundation::IInspectable const& sender, winrt::Microsoft::UI::Xaml::Controls::Primitives::DragStartedEventArgs const& e) const
    {
        check_hresult((*(impl::abi_t<DragStartedEventHandler>**)this)->Invoke(*(void**)(&sender), *(void**)(&e)));
    }
    template <typename L> ItemsChangedEventHandler::ItemsChangedEventHandler(L handler) :
        ItemsChangedEventHandler(impl::make_delegate<ItemsChangedEventHandler>(std::forward<L>(handler)))
    {
    }
    template <typename F> ItemsChangedEventHandler::ItemsChangedEventHandler(F* handler) :
        ItemsChangedEventHandler([=](auto&&... args) { return handler(args...); })
    {
    }
    template <typename O, typename M> ItemsChangedEventHandler::ItemsChangedEventHandler(O* object, M method) :
        ItemsChangedEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); })
    {
    }
    template <typename O, typename M> ItemsChangedEventHandler::ItemsChangedEventHandler(com_ptr<O>&& object, M method) :
        ItemsChangedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> ItemsChangedEventHandler::ItemsChangedEventHandler(weak_ref<O>&& object, LM&& lambda_or_method) :
        ItemsChangedEventHandler([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> ItemsChangedEventHandler::ItemsChangedEventHandler(std::shared_ptr<O>&& object, M method) :
        ItemsChangedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> ItemsChangedEventHandler::ItemsChangedEventHandler(std::weak_ptr<O>&& object, LM&& lambda_or_method) :
        ItemsChangedEventHandler([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 ItemsChangedEventHandler::operator()(winrt::Windows::Foundation::IInspectable const& sender, winrt::Microsoft::UI::Xaml::Controls::Primitives::ItemsChangedEventArgs const& e) const
    {
        check_hresult((*(impl::abi_t<ItemsChangedEventHandler>**)this)->Invoke(*(void**)(&sender), *(void**)(&e)));
    }
    template <typename L> RangeBaseValueChangedEventHandler::RangeBaseValueChangedEventHandler(L handler) :
        RangeBaseValueChangedEventHandler(impl::make_delegate<RangeBaseValueChangedEventHandler>(std::forward<L>(handler)))
    {
    }
    template <typename F> RangeBaseValueChangedEventHandler::RangeBaseValueChangedEventHandler(F* handler) :
        RangeBaseValueChangedEventHandler([=](auto&&... args) { return handler(args...); })
    {
    }
    template <typename O, typename M> RangeBaseValueChangedEventHandler::RangeBaseValueChangedEventHandler(O* object, M method) :
        RangeBaseValueChangedEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); })
    {
    }
    template <typename O, typename M> RangeBaseValueChangedEventHandler::RangeBaseValueChangedEventHandler(com_ptr<O>&& object, M method) :
        RangeBaseValueChangedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> RangeBaseValueChangedEventHandler::RangeBaseValueChangedEventHandler(weak_ref<O>&& object, LM&& lambda_or_method) :
        RangeBaseValueChangedEventHandler([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> RangeBaseValueChangedEventHandler::RangeBaseValueChangedEventHandler(std::shared_ptr<O>&& object, M method) :
        RangeBaseValueChangedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> RangeBaseValueChangedEventHandler::RangeBaseValueChangedEventHandler(std::weak_ptr<O>&& object, LM&& lambda_or_method) :
        RangeBaseValueChangedEventHandler([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 RangeBaseValueChangedEventHandler::operator()(winrt::Windows::Foundation::IInspectable const& sender, winrt::Microsoft::UI::Xaml::Controls::Primitives::RangeBaseValueChangedEventArgs const& e) const
    {
        check_hresult((*(impl::abi_t<RangeBaseValueChangedEventHandler>**)this)->Invoke(*(void**)(&sender), *(void**)(&e)));
    }
    template <typename L> ScrollEventHandler::ScrollEventHandler(L handler) :
        ScrollEventHandler(impl::make_delegate<ScrollEventHandler>(std::forward<L>(handler)))
    {
    }
    template <typename F> ScrollEventHandler::ScrollEventHandler(F* handler) :
        ScrollEventHandler([=](auto&&... args) { return handler(args...); })
    {
    }
    template <typename O, typename M> ScrollEventHandler::ScrollEventHandler(O* object, M method) :
        ScrollEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); })
    {
    }
    template <typename O, typename M> ScrollEventHandler::ScrollEventHandler(com_ptr<O>&& object, M method) :
        ScrollEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> ScrollEventHandler::ScrollEventHandler(weak_ref<O>&& object, LM&& lambda_or_method) :
        ScrollEventHandler([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> ScrollEventHandler::ScrollEventHandler(std::shared_ptr<O>&& object, M method) :
        ScrollEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename LM> ScrollEventHandler::ScrollEventHandler(std::weak_ptr<O>&& object, LM&& lambda_or_method) :
        ScrollEventHandler([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 ScrollEventHandler::operator()(winrt::Windows::Foundation::IInspectable const& sender, winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollEventArgs const& e) const
    {
        check_hresult((*(impl::abi_t<ScrollEventHandler>**)this)->Invoke(*(void**)(&sender), *(void**)(&e)));
    }
    template <typename D> auto IFlyoutBaseOverridesT<D>::CreatePresenter() const
    {
        return shim().template try_as<IFlyoutBaseOverrides>().CreatePresenter();
    }
    template <typename D> auto IFlyoutBaseOverridesT<D>::OnProcessKeyboardAccelerators(winrt::Microsoft::UI::Xaml::Input::ProcessKeyboardAcceleratorEventArgs const& args) const
    {
        return shim().template try_as<IFlyoutBaseOverrides>().OnProcessKeyboardAccelerators(args);
    }
    template <typename D> auto IPickerFlyoutBaseOverridesT<D>::OnConfirmed() const
    {
        return shim().template try_as<IPickerFlyoutBaseOverrides>().OnConfirmed();
    }
    template <typename D> auto IPickerFlyoutBaseOverridesT<D>::ShouldShowConfirmationButtons() const
    {
        return shim().template try_as<IPickerFlyoutBaseOverrides>().ShouldShowConfirmationButtons();
    }
    template <typename D> auto IRangeBaseOverridesT<D>::OnMinimumChanged(double oldMinimum, double newMinimum) const
    {
        return shim().template try_as<IRangeBaseOverrides>().OnMinimumChanged(oldMinimum, newMinimum);
    }
    template <typename D> auto IRangeBaseOverridesT<D>::OnMaximumChanged(double oldMaximum, double newMaximum) const
    {
        return shim().template try_as<IRangeBaseOverrides>().OnMaximumChanged(oldMaximum, newMaximum);
    }
    template <typename D> auto IRangeBaseOverridesT<D>::OnValueChanged(double oldValue, double newValue) const
    {
        return shim().template try_as<IRangeBaseOverrides>().OnValueChanged(oldValue, newValue);
    }
    template <typename D> auto IToggleButtonOverridesT<D>::OnToggle() const
    {
        return shim().template try_as<IToggleButtonOverrides>().OnToggle();
    }
    template <typename D, typename... Interfaces>
    struct ButtonBaseT :
        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::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, 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 = ButtonBase;
        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:
        ButtonBaseT()
        {
            impl::call_factory<ButtonBase, IButtonBaseFactory>([&](IButtonBaseFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct CarouselPanelT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelOverrides, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanel, 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::Controls::IVirtualizingPanelProtected, winrt::Microsoft::UI::Xaml::IFrameworkElementProtected, winrt::Microsoft::UI::Xaml::IUIElementProtected>,
        impl::base<D, CarouselPanel, winrt::Microsoft::UI::Xaml::Controls::VirtualizingPanel, 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::Controls::IVirtualizingPanelOverridesT<D>, winrt::Microsoft::UI::Xaml::IFrameworkElementOverridesT<D>, winrt::Microsoft::UI::Xaml::IUIElementOverridesT<D>
    {
        using composable = CarouselPanel;
        friend impl::consume_t<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelProtected>;
        friend impl::require_one<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelProtected>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::IVirtualizingPanelOverrides>;
        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:
        CarouselPanelT()
        {
            impl::call_factory<CarouselPanel, ICarouselPanelFactory>([&](ICarouselPanelFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ColorPickerSliderT :
        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::Primitives::IColorPickerSlider, 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, ColorPickerSlider, winrt::Microsoft::UI::Xaml::Controls::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 = ColorPickerSlider;
        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:
        ColorPickerSliderT()
        {
            impl::call_factory<ColorPickerSlider, IColorPickerSliderFactory>([&](IColorPickerSliderFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ColorSpectrumT :
        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::Primitives::IColorSpectrum, 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, ColorSpectrum, 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 = ColorSpectrum;
        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:
        ColorSpectrumT()
        {
            impl::call_factory<ColorSpectrum, IColorSpectrumFactory>([&](IColorSpectrumFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ColumnMajorUniformToLargestGridLayoutT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::INonVirtualizingLayoutOverrides, winrt::Microsoft::UI::Xaml::Controls::ILayoutOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayout, 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, ColumnMajorUniformToLargestGridLayout, winrt::Microsoft::UI::Xaml::Controls::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 = ColumnMajorUniformToLargestGridLayout;
        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:
        ColumnMajorUniformToLargestGridLayoutT()
        {
            impl::call_factory<ColumnMajorUniformToLargestGridLayout, IColumnMajorUniformToLargestGridLayoutFactory>([&](IColumnMajorUniformToLargestGridLayoutFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct CommandBarFlyoutCommandBarT :
        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::Primitives::ICommandBarFlyoutCommandBar, winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBar2, 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, CommandBarFlyoutCommandBar, winrt::Microsoft::UI::Xaml::Controls::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 = CommandBarFlyoutCommandBar;
        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:
        CommandBarFlyoutCommandBarT()
        {
            impl::call_factory<CommandBarFlyoutCommandBar, ICommandBarFlyoutCommandBarFactory>([&](ICommandBarFlyoutCommandBarFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct DragCompletedEventArgsT :
        implements<D, winrt::Windows::Foundation::IInspectable, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragCompletedEventArgs, winrt::Microsoft::UI::Xaml::IRoutedEventArgs>,
        impl::base<D, DragCompletedEventArgs, winrt::Microsoft::UI::Xaml::RoutedEventArgs>
    {
        using composable = DragCompletedEventArgs;
    protected:
        DragCompletedEventArgsT(double horizontalChange, double verticalChange, bool canceled)
        {
            impl::call_factory<DragCompletedEventArgs, IDragCompletedEventArgsFactory>([&](IDragCompletedEventArgsFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstanceWithHorizontalChangeVerticalChangeAndCanceled(horizontalChange, verticalChange, canceled, *this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct DragDeltaEventArgsT :
        implements<D, winrt::Windows::Foundation::IInspectable, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragDeltaEventArgs, winrt::Microsoft::UI::Xaml::IRoutedEventArgs>,
        impl::base<D, DragDeltaEventArgs, winrt::Microsoft::UI::Xaml::RoutedEventArgs>
    {
        using composable = DragDeltaEventArgs;
    protected:
        DragDeltaEventArgsT(double horizontalChange, double verticalChange)
        {
            impl::call_factory<DragDeltaEventArgs, IDragDeltaEventArgsFactory>([&](IDragDeltaEventArgsFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstanceWithHorizontalChangeAndVerticalChange(horizontalChange, verticalChange, *this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct DragStartedEventArgsT :
        implements<D, winrt::Windows::Foundation::IInspectable, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragStartedEventArgs, winrt::Microsoft::UI::Xaml::IRoutedEventArgs>,
        impl::base<D, DragStartedEventArgs, winrt::Microsoft::UI::Xaml::RoutedEventArgs>
    {
        using composable = DragStartedEventArgs;
    protected:
        DragStartedEventArgsT(double horizontalOffset, double verticalOffset)
        {
            impl::call_factory<DragStartedEventArgs, IDragStartedEventArgsFactory>([&](IDragStartedEventArgsFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstanceWithHorizontalOffsetAndVerticalOffset(horizontalOffset, verticalOffset, *this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct FlyoutBaseT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, FlyoutBase, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverridesT<D>
    {
        using composable = FlyoutBase;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverrides>;
    protected:
        FlyoutBaseT()
        {
            impl::call_factory<FlyoutBase, IFlyoutBaseFactory>([&](IFlyoutBaseFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct FlyoutShowOptionsT :
        implements<D, winrt::Windows::Foundation::IInspectable, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions>,
        impl::base<D, FlyoutShowOptions>
    {
        using composable = FlyoutShowOptions;
    protected:
        FlyoutShowOptionsT()
        {
            impl::call_factory<FlyoutShowOptions, IFlyoutShowOptionsFactory>([&](IFlyoutShowOptionsFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct GridViewItemPresenterT :
        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::Primitives::IGridViewItemPresenter, 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, GridViewItemPresenter, 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 = GridViewItemPresenter;
        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:
        GridViewItemPresenterT()
        {
            impl::call_factory<GridViewItemPresenter, IGridViewItemPresenterFactory>([&](IGridViewItemPresenterFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct InfoBarPanelT :
        implements<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanel, 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, InfoBarPanel, 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 = InfoBarPanel;
        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:
        InfoBarPanelT()
        {
            impl::call_factory<InfoBarPanel, IInfoBarPanelFactory>([&](IInfoBarPanelFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ListViewItemPresenterT :
        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::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, 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 = ListViewItemPresenter;
        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:
        ListViewItemPresenterT()
        {
            impl::call_factory<ListViewItemPresenter, IListViewItemPresenterFactory>([&](IListViewItemPresenterFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct MonochromaticOverlayPresenterT :
        implements<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenter, 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, MonochromaticOverlayPresenter, 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 = MonochromaticOverlayPresenter;
        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:
        MonochromaticOverlayPresenterT()
        {
            impl::call_factory<MonochromaticOverlayPresenter, IMonochromaticOverlayPresenterFactory>([&](IMonochromaticOverlayPresenterFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct NavigationViewItemPresenterT :
        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::Primitives::INavigationViewItemPresenter, winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenter2, 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, NavigationViewItemPresenter, 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 = NavigationViewItemPresenter;
        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:
        NavigationViewItemPresenterT()
        {
            impl::call_factory<NavigationViewItemPresenter, INavigationViewItemPresenterFactory>([&](INavigationViewItemPresenterFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct NavigationViewItemPresenterTemplateSettingsT :
        implements<D, winrt::Windows::Foundation::IInspectable, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterTemplateSettings, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, NavigationViewItemPresenterTemplateSettings, winrt::Microsoft::UI::Xaml::DependencyObject>
    {
        using composable = NavigationViewItemPresenterTemplateSettings;
    protected:
        NavigationViewItemPresenterTemplateSettingsT()
        {
            impl::call_factory<NavigationViewItemPresenterTemplateSettings, INavigationViewItemPresenterTemplateSettingsFactory>([&](INavigationViewItemPresenterTemplateSettingsFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct PickerFlyoutBaseT :
        implements<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseOverrides, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBase, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase2, winrt::Microsoft::UI::Xaml::IDependencyObject>,
        impl::base<D, PickerFlyoutBase, winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase, winrt::Microsoft::UI::Xaml::DependencyObject>,
        winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseOverridesT<D>, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverridesT<D>
    {
        using composable = PickerFlyoutBase;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseOverrides>;
        friend impl::produce<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverrides>;
    protected:
        PickerFlyoutBaseT()
        {
            impl::call_factory<PickerFlyoutBase, IPickerFlyoutBaseFactory>([&](IPickerFlyoutBaseFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct PivotHeaderItemT :
        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::Primitives::IPivotHeaderItem, 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, PivotHeaderItem, 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 = PivotHeaderItem;
        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:
        PivotHeaderItemT()
        {
            impl::call_factory<PivotHeaderItem, IPivotHeaderItemFactory>([&](IPivotHeaderItemFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct RangeBaseT :
        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::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, 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 = RangeBase;
        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:
        RangeBaseT()
        {
            impl::call_factory<RangeBase, IRangeBaseFactory>([&](IRangeBaseFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct RepeatedScrollSnapPointT :
        implements<D, winrt::Windows::Foundation::IInspectable, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedScrollSnapPoint, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointBase, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISnapPointBase>,
        impl::base<D, RepeatedScrollSnapPoint, winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollSnapPointBase, winrt::Microsoft::UI::Xaml::Controls::Primitives::SnapPointBase>
    {
        using composable = RepeatedScrollSnapPoint;
    protected:
        RepeatedScrollSnapPointT(double offset, double interval, double start, double end, winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollSnapPointsAlignment const& alignment)
        {
            impl::call_factory<RepeatedScrollSnapPoint, IRepeatedScrollSnapPointFactory>([&](IRepeatedScrollSnapPointFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(offset, interval, start, end, alignment, *this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct RepeatedZoomSnapPointT :
        implements<D, winrt::Windows::Foundation::IInspectable, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedZoomSnapPoint, winrt::Microsoft::UI::Xaml::Controls::Primitives::IZoomSnapPointBase, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISnapPointBase>,
        impl::base<D, RepeatedZoomSnapPoint, winrt::Microsoft::UI::Xaml::Controls::Primitives::ZoomSnapPointBase, winrt::Microsoft::UI::Xaml::Controls::Primitives::SnapPointBase>
    {
        using composable = RepeatedZoomSnapPoint;
    protected:
        RepeatedZoomSnapPointT(double offset, double interval, double start, double end)
        {
            impl::call_factory<RepeatedZoomSnapPoint, IRepeatedZoomSnapPointFactory>([&](IRepeatedZoomSnapPointFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(offset, interval, start, end, *this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ScrollPresenterT :
        implements<D, winrt::Microsoft::UI::Xaml::IFrameworkElementOverrides, winrt::Microsoft::UI::Xaml::IUIElementOverrides, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter, winrt::Microsoft::UI::Xaml::Controls::IScrollAnchorProvider, 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, ScrollPresenter, 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 = ScrollPresenter;
        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:
        ScrollPresenterT()
        {
            impl::call_factory<ScrollPresenter, IScrollPresenterFactory>([&](IScrollPresenterFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ScrollSnapPointT :
        implements<D, winrt::Windows::Foundation::IInspectable, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPoint, winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointBase, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISnapPointBase>,
        impl::base<D, ScrollSnapPoint, winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollSnapPointBase, winrt::Microsoft::UI::Xaml::Controls::Primitives::SnapPointBase>
    {
        using composable = ScrollSnapPoint;
    protected:
        ScrollSnapPointT(double snapPointValue, winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollSnapPointsAlignment const& alignment)
        {
            impl::call_factory<ScrollSnapPoint, IScrollSnapPointFactory>([&](IScrollSnapPointFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(snapPointValue, alignment, *this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct SelectorItemT :
        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::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, 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 = SelectorItem;
        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:
        SelectorItemT()
        {
            impl::call_factory<SelectorItem, ISelectorItemFactory>([&](ISelectorItemFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct TabViewListViewT :
        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::Primitives::ITabViewListView, 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, TabViewListView, 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 = TabViewListView;
        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:
        TabViewListViewT()
        {
            impl::call_factory<TabViewListView, ITabViewListViewFactory>([&](ITabViewListViewFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ToggleButtonT :
        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::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, 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 = ToggleButton;
        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:
        ToggleButtonT()
        {
            impl::call_factory<ToggleButton, IToggleButtonFactory>([&](IToggleButtonFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); });
        }
    };
    template <typename D, typename... Interfaces>
    struct ZoomSnapPointT :
        implements<D, winrt::Windows::Foundation::IInspectable, composing, Interfaces...>,
        impl::require<D, winrt::Microsoft::UI::Xaml::Controls::Primitives::IZoomSnapPoint, winrt::Microsoft::UI::Xaml::Controls::Primitives::IZoomSnapPointBase, winrt::Microsoft::UI::Xaml::Controls::Primitives::ISnapPointBase>,
        impl::base<D, ZoomSnapPoint, winrt::Microsoft::UI::Xaml::Controls::Primitives::ZoomSnapPointBase, winrt::Microsoft::UI::Xaml::Controls::Primitives::SnapPointBase>
    {
        using composable = ZoomSnapPoint;
    protected:
        ZoomSnapPointT(double snapPointValue)
        {
            impl::call_factory<ZoomSnapPoint, IZoomSnapPointFactory>([&](IZoomSnapPointFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(snapPointValue, *this, this->m_inner); });
        }
    };
}
namespace std
{
#ifndef WINRT_LEAN_AND_MEAN
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarButtonTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAppBarToggleButtonTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAutoSuggestBoxHelper> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IAutoSuggestBoxHelperStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBase> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBaseFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IButtonBaseStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarPanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICalendarViewTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICarouselPanelFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorPickerSlider> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorPickerSliderFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorPickerSliderStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrum> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColorSpectrumStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayoutFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IColumnMajorUniformToLargestGridLayoutStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxHelper> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxHelperStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IComboBoxTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBar> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBar2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarAutomationPropertiesStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarFlyoutCommandBarTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICommandBarTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusFilterConverterStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ICornerRadiusToThicknessConverterStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragCompletedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragCompletedEventArgsFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragDeltaEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragDeltaEventArgsFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragStartedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IDragStartedEventArgsFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBase2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseClosingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseOverrides> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutBaseStatics2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptions> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IFlyoutShowOptionsFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGeneratorPositionHelper> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGeneratorPositionHelperStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemPresenterStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IGridViewItemTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IInfoBarPanelStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IItemsChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemBackgroundConverterStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IJumpListItemForegroundConverterStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILayoutInformation> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILayoutInformationStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemPresenterStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IListViewItemTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelector> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorPanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ILoopingSelectorStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMenuFlyoutItemTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMenuFlyoutPresenterTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenterFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IMonochromaticOverlayPresenterStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenter2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterStatics2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterTemplateSettingsFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::INavigationViewItemPresenterTemplateSettingsStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IOrientedVirtualizingPanelFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBase> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseOverrides> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPickerFlyoutBaseStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPivotHeaderItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPivotHeaderItemFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPivotHeaderPanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPivotPanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopup3> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics2> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IPopupStatics3> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBase> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseOverrides> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRangeBaseValueChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatButton> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatButtonStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedScrollSnapPoint> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedScrollSnapPointFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedZoomSnapPoint> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IRepeatedZoomSnapPointFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBar> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollBarStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollController> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerAddScrollVelocityRequestedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerAddScrollVelocityRequestedEventArgsFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanRequestedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanRequestedEventArgsFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerPanningInfo> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollByRequestedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollByRequestedEventArgsFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollToRequestedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollControllerScrollToRequestedEventArgsFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollPresenterStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPoint> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointBase> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointBaseFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IScrollSnapPointsInfo> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelector> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorItemFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorItemStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISelectorStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISnapPointBase> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISnapPointBaseFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ISplitViewTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ITabViewListView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ITabViewListViewFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumb> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IThumbStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ITickBar> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ITickBarStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButton> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonOverrides> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleButtonStatics> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToggleSwitchTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IToolTipTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IZoomSnapPoint> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IZoomSnapPointBase> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IZoomSnapPointBaseFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::IZoomSnapPointFactory> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::AppBarButtonTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::AppBarTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::AppBarToggleButtonTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::AutoSuggestBoxHelper> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ButtonBase> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::CalendarPanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::CalendarViewTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::CarouselPanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ColorPickerSlider> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ColorSpectrum> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ColumnMajorUniformToLargestGridLayout> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ComboBoxHelper> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ComboBoxTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::CommandBarFlyoutCommandBar> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::CommandBarFlyoutCommandBarAutomationProperties> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::CommandBarFlyoutCommandBarTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::CommandBarTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::CornerRadiusFilterConverter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::CornerRadiusToThicknessConverter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::DragCompletedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::DragDeltaEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::DragStartedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBase> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutBaseClosingEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::FlyoutShowOptions> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::GeneratorPositionHelper> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::GridViewItemPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::GridViewItemTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::InfoBarPanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ItemsChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::JumpListItemBackgroundConverter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::JumpListItemForegroundConverter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::LayoutInformation> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ListViewItemPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ListViewItemTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::LoopingSelector> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::LoopingSelectorItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::LoopingSelectorPanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::MenuFlyoutItemTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::MenuFlyoutPresenterTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::MonochromaticOverlayPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::NavigationViewItemPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::NavigationViewItemPresenterTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::OrientedVirtualizingPanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::PickerFlyoutBase> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::PivotHeaderItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::PivotHeaderPanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::PivotPanel> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::Popup> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::RangeBase> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::RangeBaseValueChangedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::RepeatButton> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::RepeatedScrollSnapPoint> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::RepeatedZoomSnapPoint> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollBar> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerAddScrollVelocityRequestedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerPanRequestedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerScrollByRequestedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollControllerScrollToRequestedEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollEventArgs> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollPresenter> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollSnapPoint> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ScrollSnapPointBase> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::Selector> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::SelectorItem> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::SnapPointBase> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::SplitViewTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::TabViewListView> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::Thumb> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::TickBar> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ToggleButton> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ToggleSwitchTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ToolTipTemplateSettings> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ZoomSnapPoint> : winrt::impl::hash_base {};
    template<> struct hash<winrt::Microsoft::UI::Xaml::Controls::Primitives::ZoomSnapPointBase> : winrt::impl::hash_base {};
#endif
#ifdef __cpp_lib_format
#endif
}
#endif
