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 - Popup question

 
 
Old 06-05-2006   #1 (permalink)
Vipin [MVP]


 
 

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


 
 

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


 
 

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


 
 

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
 

Thread Tools


Similar Threads
Thread Forum
Popup ads Live Mail
popup Vista General
IE8 popup Network & Sharing
UAC popup Vista General
UAC frequent popup Vista security


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