Public Class OptimizePanelV

   Private Sub OptimizeBtn_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
      Dim OptimizeBtn = TryCast(sender, FrameworkElement)

      If OptimizeBtn IsNot Nothing Then
         OptimizeBtn.ContextMenu.IsOpen = True
      End If
   End Sub

End Class
