-
Wpf With Xaml+visualstudio(vbasic)
Unnable to create a Menu using the control Menu in the toolbox of Vbasic(code-behind) neither with xaml code(no response) in the first window when creating an application with the wpf application template in visual studio. Any help?
-
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
-
The Click Event
Thanks Phil, I missed the menu tag at the beginning but I do not find the, for ex. ,close_click event so as to close the application .I only find the click event of the main(the first) tag , say file but not the other ones. Should I write a sub on_click for that?
regards
-
Thanks Phil
Hi Phil
I got it. Not quite well but I am in the way. I am trying to do with WPF what I do with Windows Forms (MDIs-maybe I will have to ask you again-, Menus and the like..) for the first time.
Here it is
<Window x:Class="Miespacio.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300" Topmost="True">
<Grid>
<Menu Margin="10,10,68,0" Background="White" Height="21" VerticalAlignment="Top">
<MenuItem Header="Archivo" Background="LightBlue" Name="MenuItem1" >
<MenuItem Header="_Nuevo" />
<MenuItem Header="_Abrir" />
<MenuItem Header="_Salir" Click="OnClick"/>
</MenuItem>
</Menu>
</Grid>
</Window>
Namespace Miespacio
Partial Class Window1
Sub OnClick(ByVal sender As Object, ByVal args As RoutedEventArgs)
Me.Close()
End Sub
End Class
End Namespace
Thanks for your kindness
Similar Threads
-
Replies: 0
Last Post: 04-24-2007, 05:33 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks