Vyyk_Drago
asked on
Help with converting C# code to VB .NET
Hi,
Iam learning wpf using vb.net and am working through a tutorial on the Ribobn control UI element. I have the turorial here but the code here is in C#.
http://www.uxpassion.com/2008/11/how-to-use-add-ribbon-to-wpf-applications-part-3/
Can someone please help me on how to implement this small bit using VB.NET - this is what I have so far, but I keep getting the error saying OnCanExecute is not member of testapp.testapp.Window1.
Any help will be much appreciated.
Thanks
V
Iam learning wpf using vb.net and am working through a tutorial on the Ribobn control UI element. I have the turorial here but the code here is in C#.
http://www.uxpassion.com/2008/11/how-to-use-add-ribbon-to-wpf-applications-part-3/
Can someone please help me on how to implement this small bit using VB.NET - this is what I have so far, but I keep getting the error saying OnCanExecute is not member of testapp.testapp.Window1.
Any help will be much appreciated.
Thanks
V
Imports System
Imports System.IO
Imports System.Net
Imports System.Windows
Imports System.Windows.Controls
Imports Microsoft.Windows.Controls.Ribbon
Imports System.Windows.Data
Imports System.Windows.Media
Imports System.Windows.Media.Animation
Imports System.Windows.Navigation
Imports System.Collections.ObjectModel
Imports System.Windows.Input
Class Window1
Private Sub OnCanExecute(ByVal target As Object, ByVal args As CanExecuteRoutedEventArgs)
End Sub
End Class
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi nandithaa,
That works excellently except for a small typo where
Private Sub OnShowClipboardGroup(ByVal target As Object, ByVal args As CanExecuteRoutedEventArgs)
should probably read
Private Sub ListGlobalNamesCommand(ByV al target As Object, ByVal args As ExecutedRoutedEventArgs)
Much appreciated :)
Thanks
V
That works excellently except for a small typo where
Private Sub OnShowClipboardGroup(ByVal
should probably read
Private Sub ListGlobalNamesCommand(ByV
Much appreciated :)
Thanks
V
ASKER
Small typo, but on the whole very clear and useful.
Thanks :)
Thanks :)
OnCanExecute is a private method, and not accessible outside of the Window1 class:
Private Sub OnCanExecute