Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - Context Menu IN XBAP

 
 
Old 06-27-2007   #1 (permalink)
Boomessh


 
 

Context Menu IN XBAP

Hi all,

I am trying to create a contextMenu in an Xbap application, but it doesn't
work. Is it because of the fact that popup windows are restricted in XBAP?
Then why at all we need to go for XBAP?

I tried the same code in XAMLPAD and it works fine..
the code is...
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
<Grid>
<Button Name="cmButton" Height="30">
Button with Context Menu
<Button.ContextMenu>
<ContextMenu Name="cm" StaysOpen="true">
<MenuItem Header="File"/>
<MenuItem Header="Save"/>
<MenuItem Header="SaveAs"/>
<MenuItem Header="Recent Files">
<MenuItem Header="ReadMe.txt"/>
<MenuItem Header="Schedule.xls"/>
</MenuItem>
</ContextMenu>
</Button.ContextMenu>
</Button>
</Grid>
</Page>

Could any one out there please answer my question?

Thanks,
V.Boomessh

My System SpecsSystem Spec
Old 06-27-2007   #2 (permalink)
Laurent Bugnion, MVP


 
 

Re: Context Menu IN XBAP

Hi,

Boomessh wrote:
> Hi all,
>
> I am trying to create a contextMenu in an Xbap application, but it doesn't
> work. Is it because of the fact that popup windows are restricted in XBAP?
> Then why at all we need to go for XBAP?


It works fine on my PC. Can you give more details?

Greetings,
Laurent

>
> I tried the same code in XAMLPAD and it works fine..
> the code is...
> <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
> xmlns:sys="clr-namespace:System;assembly=mscorlib"
> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
> <Grid>
> <Button Name="cmButton" Height="30">
> Button with Context Menu
> <Button.ContextMenu>
> <ContextMenu Name="cm" StaysOpen="true">
> <MenuItem Header="File"/>
> <MenuItem Header="Save"/>
> <MenuItem Header="SaveAs"/>
> <MenuItem Header="Recent Files">
> <MenuItem Header="ReadMe.txt"/>
> <MenuItem Header="Schedule.xls"/>
> </MenuItem>
> </ContextMenu>
> </Button.ContextMenu>
> </Button>
> </Grid>
> </Page>
>
> Could any one out there please answer my question?
>
> Thanks,
> V.Boomessh


--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft.ch
PhotoAlbum: http://www.galasoft.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
My System SpecsSystem Spec
Old 06-28-2007   #3 (permalink)
Boomessh


 
 

Re: Context Menu IN XBAP

Hi Laurent,

Thanks for your reply. I don't know what happened...yesterday it worked in
XAMLPAD and did not work when i tried creating a XBAP project. But today to
get the error message for you, once i ran the project it worked.

ANy way thanks for your reply.

Bye,
Boomessh V

"Laurent Bugnion, MVP" wrote:

> Hi,
>
> Boomessh wrote:
> > Hi all,
> >
> > I am trying to create a contextMenu in an Xbap application, but it doesn't
> > work. Is it because of the fact that popup windows are restricted in XBAP?
> > Then why at all we need to go for XBAP?

>
> It works fine on my PC. Can you give more details?
>
> Greetings,
> Laurent
>
> >
> > I tried the same code in XAMLPAD and it works fine..
> > the code is...
> > <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
> > xmlns:sys="clr-namespace:System;assembly=mscorlib"
> > xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
> > <Grid>
> > <Button Name="cmButton" Height="30">
> > Button with Context Menu
> > <Button.ContextMenu>
> > <ContextMenu Name="cm" StaysOpen="true">
> > <MenuItem Header="File"/>
> > <MenuItem Header="Save"/>
> > <MenuItem Header="SaveAs"/>
> > <MenuItem Header="Recent Files">
> > <MenuItem Header="ReadMe.txt"/>
> > <MenuItem Header="Schedule.xls"/>
> > </MenuItem>
> > </ContextMenu>
> > </Button.ContextMenu>
> > </Button>
> > </Grid>
> > </Page>
> >
> > Could any one out there please answer my question?
> >
> > Thanks,
> > V.Boomessh

>
> --
> Laurent Bugnion [MVP ASP.NET]
> Software engineering, Blog: http://www.galasoft.ch
> PhotoAlbum: http://www.galasoft.ch/pictures
> Support children in Calcutta: http://www.calcutta-espoir.ch
>

My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Context Menu Vista General
Solved New context menu General Discussion
Start Menu - Customize Context Menu Tutorials
Send To Context Menu - Restore Default Menu Items Tutorials
New Context Menu - Restore Default Menu Items Tutorials


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46