如何在不使用WPF控件的情况下写出按钮事件?

如何在不使用WPF控件的情况下写出按钮事件?,wpf,vb.net,visual-studio,wpf-controls,Wpf,Vb.net,Visual Studio,Wpf Controls,我不知道如何在标题中指定,这是在WPF visual basic中。我想知道如何编写代码,以便在单击按钮时,tabcontrol选择将为=1 以下是我的主窗口RightWindowCommands中的内容: <Button Content="Information" Cursor="Hand" Click="InformationButton_OnClick" ToolTip="View the information"

我不知道如何在标题中指定,这是在WPF visual basic中。我想知道如何编写代码,以便在单击按钮时,tabcontrol选择将为=1

以下是我的主窗口RightWindowCommands中的内容:

 <Button Content="Information" Cursor="Hand" Click="InformationButton_OnClick"
                      ToolTip="View the information"
                      x:Name="InformationView"/>


但是,我没有使用WPF工具的按钮,因为这是一个GUI,我必须将按钮放在右侧WindowCommands,我想知道如何生成代码,以便
InformationButton\u OnClick
为我提供
tabControl.SelectedIndex=1
。请指导我写出这段代码

这是一个很好的例子,用于onclick事件处理图片,您可以将其更改为数字而不是图片

`AddHandler pic.Click, AddressOf pic_Click'

Private Sub pic_Click(ByVal sender As Object, ByVal e As EventArgs)
    Dim pic As PictureBox = DirectCast(sender, PictureBox)
    ' etc...
End Sub

来源:

需要帮助!我只能在C#中找到解决方案,但不能在VB中找到!我对这个很陌生,请引导我!