Hello,
I would like to restrict a xamDialogWindow to silverlight client : like RestrictInContainer, but with a restriction on the whole silverlight plugin window.
Is there sample for this restriction? this could be a nice new feature ;)
Regards,
I've expended your sample to something more complete:
private void xamDialogWindow_Moving(object sender, Infragistics.Controls.Interactions.MovingEventArgs e) { XamDialogWindow dialogWindow = (XamDialogWindow)sender; if (e.Left < 0 || e.Left > ((FrameworkElement)App.Current.RootVisual).ActualWidth - dialogWindow.ActualWidth) { e.Cancel = true; return; } if (e.Top < 0 || e.Top > ((FrameworkElement)App.Current.RootVisual).ActualHeight - dialogWindow.Height) { e.Cancel = true; return; } }
But this is not enough : if the browser window size is reduced by user, xamDialogWindow may leave the visible area.
Maybe you should a new option RestrictInRootVisual like RestrictInContainer : that would be useful for users of xamDialogWindow.
Regards,Julien
HI,
You could wire up the XamDialogMoving event and cancel it if the windows goes too far to the left or from the top.
Here is a code snippet
private void xamDialogWindow1_Moving(object sender, Infragistics.Controls.Interactions.MovingEventArgs e)
{
if (e.Left > 200)
e.Cancel =
true;
}
if (e.Top > 200)
}Sinceerly, MattDeveloper Support Engineer