Windows Vista Forums
Vista Forums Home Join Vista Forums Webcasts Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

Context Menu IN XBAP

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 06-27-2007   #1 (permalink)
Boomessh
Guest


 

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
Guest


 

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
Guest


 

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
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
New Context Menu - Restore Default Menu Items Brink Tutorials 6 2 Weeks Ago 06:31 PM
Send To Context Menu - Restore Default Menu Items Brink Tutorials 4 08-23-2008 04:34 PM
Start Menu - Customize Context Menu Brink Tutorials 3 06-27-2008 12:29 AM
context menu doesn't appear sometimes Inti Vista performance & maintenance 1 12-29-2007 06:54 PM
Context Menu lobotomy- Vista General 0 05-27-2007 09:14 AM


Vistax64.com 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 2005-2008

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 47 48 49 50 51