我需要将视图的类名作为 CommandParameter 传递。这该怎么做?
<UserControl x:Name="window"
x:Class="Test.Views.MyView"
...>
<Grid x:Name="LayoutRoot" Margin="2">
<Grid.Resources>
<DataTemplate x:Key="tabItemTemplate">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" >
<Button Command="{Binding DataContext.CloseCommand, ElementName=window}"
CommandParameter="{Binding x:Class, ElementName=window}">
</Button>
</StackPanel>
</DataTemplate>
</Grid.Resources>
</Grid>
</UserControl>
结果应该是字符串“Test.Views.MyView”。