-
Aug 19th, 2010, 06:17 AM
#1
Thread Starter
Member
How to drag a popup window
can anyone advise me how to drag a popup window in wpf
-
Aug 19th, 2010, 09:05 AM
#2
Lively Member
Re: How to drag a popup window
put this in the xaml for the container of the window. probably a grid.
Code:
MouseLeftButtonDown="DragWindow"
add this to the code and you should be set. you will prob have to tweak this for c# if thats what you r using
Code:
Private Sub DragWindow(ByVal sender As Object, ByVal e As MouseButtonEventArgs)
DragMove()
End Sub
-
Aug 20th, 2010, 01:36 AM
#3
Thread Starter
Member
Re: How to drag a popup window
Thanks for your help
But actually i want to enable drag option for a popup control like the below
<Popup x:Uid="SVpopup"
x:Name="SVpopup"
PopupAnimation="Slide"
Width="550" Height="400" Placement="AbsolutePoint"
IsOpen="False" PlacementTarget="{Binding ElementName=MyGraphicsLyrSV}">
<Border x:Uid="Border2" Margin="10,20,0,20" x:Name="Border2"
CornerRadius="10,10,10,10"
ScrollViewer.VerticalScrollBarVisibility="Disabled"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
BorderThickness="5,5,5,5" Background="#FF000000">
<WebBrowser x:Name="SVBrowser" Visibility="Visible"/>
</Border>
</Popup>
please advise me how to make this popup draggable
-
Aug 22nd, 2010, 05:48 PM
#4
Hyperactive Member
Re: How to drag a popup window
Try to handle the PreviewMouseLeftButtonDown event for the Popup class and manipulate any property that sets it's position with the mouse coordinates. It shall be easy to do.
-
Aug 23rd, 2010, 11:16 PM
#5
Thread Starter
Member
Re: How to drag a popup window
cud u pls help me to do that if you dont mind. thanks in advance
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|