If there is no Modeless option(?) is there another way to make a small movable informational Dialog/Window/Page on top of my page. I need to keep this up as a reference but have it be movable so the underlying information can be revealed. Visual Studio 2015, Future Store App. Thanks.
Asked
Active
Viewed 394 times
1 Answers
1
You can't make the standard dialog modeless. To achieve what you want you should use a custom panel on top of your page with manipulation events hooked up to it. For example:
<Grid x:Name="LayoutRoot">
<!-- some other content -->
<Grid x:Name="Dialog" Background="Red" Width="200" Height="100"
ManipulationMode="All" ManipulationDelta="Dialog_OnManipulationDelta">
<Grid.RenderTransform>
<CompositeTransform x:Name="DialogTransform" />
</Grid.RenderTransform>
</Grid>
</Grid>
And code behind:
private void Dialog_OnManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs args)
{
DialogTransform.TranslateX += args.Delta.Translation.X;
DialogTransform.TranslateY += args.Delta.Translation.Y;
}
Then you can build more complicated logic like show/hide animations, close buttons, etc.

Andrei Ashikhmin
- 2,401
- 2
- 20
- 34
-
That works great. Now is there a way to get back my select capability in a contained TextBox? I go to select text and the box moves around the display instead. New to using OnManipulationDelta. – Rick Aug 26 '16 at 13:36
-
private void OnTextBoxMainipulation(object sender,Windows.UI.Xaml.Input.ManipulationDeltaRoutedEventArgs e) { DialogTransform.TranslateX-= e.Delta.Translation.X ; DialogTransform.TranslateY-=e.Delta.Translation.Y; } – Rick Aug 26 '16 at 16:09
-
Turns out this can also be done with a multiple view page. I am getting the bugs out of this but the code is on: http://stackoverflow.com/questions/39185575/how-get-different-size-windows-in-uwp-multiple-views – Rick Aug 27 '16 at 20:45