Windows Vista Forums
Vista Forums Home Join Vista Forums Donate 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

Popup question

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 06-05-2006   #1 (permalink)
Vipin [MVP]
Guest


 

Popup question

For the following XAML, Once I bring up the popup,
I can't dismiss it by clicking somewhere outside, I have StaysOpen="false"

<Button HorizontalAlignment="Left" x:Name="btn" Click="DisplayPopup">
<StackPanel>
<TextBlock>Click</TextBlock>
<Popup StaysOpen="false" x:Name="ButtonPopup">
<StackPanel>
<MenuItem Name="PopupText" Background="Blue" Header="Blue"
Click="OnBlue">
</MenuItem>
<MenuItem Background="Red" Header="Red"
Click="OnRed"></MenuItem>
</StackPanel>
</Popup>
</StackPanel>
</Button>

// Sample event handler:
private void DisplayPopup(object sender, RoutedEventArgs e)
{
ButtonPopup.IsOpen = true;
}
private void OnRed(object sender, RoutedEventArgs e)
{
MessageBox.Show("Chose Red");
}
private void OnBlue(object sender, RoutedEventArgs e)
{
MessageBox.Show("Chose Blue");
}

--
Vipin Aravind
http://www.explorewindows.com



My System SpecsSystem Spec
Old 06-06-2006   #2 (permalink)
Marek
Guest


 

RE: Popup question

Yes, I have the same problem in my DropDownButton I use in my ColorPicker.
Popup closes only after you have focused some control on it.

My System SpecsSystem Spec
Old 06-06-2006   #3 (permalink)
Marek
Guest


 

RE: Popup question

And one more thing:
When I use for example Border with no Background set in Popup, it has black
color (or transparent when I allow transparency in Popup) but the Border in
normal Window or Page has white color (or the color of window as defined in
Windows OS).
My System SpecsSystem Spec
Old 06-06-2006   #4 (permalink)
Vipin
Guest


 

Re: Popup question

Exactly,that is a bug. I see that problem too,to overcome I am explicitly
setting the
Background property on the menuitem.

--
Vipin Aravind
http://www.explorewindows.com


"Marek" <Marek@discussions.microsoft.com> wrote in message
news:60E61299-F8EA-4899-9F6A-0EAD6534A229@microsoft.com...
> And one more thing:
> When I use for example Border with no Background set in Popup, it has
> black
> color (or transparent when I allow transparency in Popup) but the Border
> in
> normal Window or Page has white color (or the color of window as defined
> in
> Windows OS).



My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Acrobat popup :( dbacs Software 5 05-18-2008 07:05 PM
dllhost.exe dos popup mrteo Vista General 0 03-20-2008 03:01 PM
SP1 and IE popup windows Doogal Vista General 4 02-22-2008 08:56 AM
popup permissions bobbya Vista account administration 4 12-19-2007 11:31 AM
Battery Popup killjoy Vista General 2 05-29-2007 11:20 PM


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