我有一个像这样的按钮的xaml:
Button.xaml
<Grid x:Name="LayoutRoot" >
<StackPanel >
<Button Content="Button1" Click="Button1_Click" />
</StackPanel >
</Grid>
和Button.xaml.cs:
private void Button1_Click(object sender, RoutedEventArgs e)
{
// Get a instance of ClientOversikt
CustomerView childWindow = m_container.Resolve<CustomerView >();
childWindow.Show();
}
工作正常。但我想在Button.xaml中使用Databinding而不是Click =“Button1_Click”。我怎么能这样做?
我感谢所有的帮助