是否可以将当前 DataContext 作为 ObjectDataProvider 的 ContructorParameter 传递?

Is it possible to pass current DataContext as ContructorParameter of ObjectDataProvider?

将 DataContext 作为 DataTemplate 的参数传递会非常有用:

<DataTemplate>
    <DataTemplate.Resources>
        <ObjectDataProvider x:Key="ServiceDataProvider" ObjectType="{x:Type control:ServiceLayout}">
             <ObjectDataProvider.ConstructorParameters>
                /*here could be DataContext..but how?*/
             </ObjectDataProvider.ConstructorParameters>
        </ObjectDataProvider>
    </DataTemplate.Resources>
    <ContentPresenter
               Content="{Binding
                    Source={StaticResource ServiceDataProvider}}" />
</DataTemplate>

我将在 ListBox ItemTemplate 中使用此 DataTemplate。因此,DataContext 将是 ListBoxItem 绑定对象(类型已知)

是否有任何其他方法可以将参数从 DataTemplate 传递给构造函数?

感谢Magnus (MM8) for the answer here: Is it possible to pass current DataContext as ContructorParameter of ObjectDataProvider?