DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2007
    Posts
    10

    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?

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    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!

  3. #3
    Join Date
    Oct 2007
    Posts
    10

    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

  4. #4
    Join Date
    Oct 2007
    Posts
    10

    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

  1. (WPF) Zooming & Panning
    By ToVdb in forum .NET
    Replies: 0
    Last Post: 04-24-2007, 05:33 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


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


Sponsored Links