I have implement the radial menus commands like Undo, Copy, or Paste ,etc. for pdf in windows store app as the following link:
http://blogs.u2u.be/diederik/post/2014/02/23/A-Floating-Control-for-Windows-8-Store-apps.aspx
I use the shortcut menu inside of a windows store app where I show a Viewer with a pdf.
If I change the windows resolution as HDMI connection,sometimes radial menus cannot show in my application.
This code already includes the position correction to avoid hiding the radial menu from the screen of Windows Store app.
Can anybody suggest what could be wrong ? I try to control the Page_SizeChanged().
Implementation source codes are as follows.
============================================================================================================
private async void Page_SizeChanged(object sender, SizeChangedEventArgs e)
{
if ((e.PreviousSize.Width > 0 && e.PreviousSize.Height > 0) &&
(e.PreviousSize.Width != e.NewSize.Width || e.PreviousSize.Height != e.NewSize.Height))
{
// Shortcut menu position correction
double posTop, posLeft;
_ShortcutMenuControl.GetShortcutMenuPosition(out posTop, out posLeft);
if (posTop < 0 || posLeft > e.NewSize.Width - 200)
{
// The re-set to the default position when shortcut
has hidden off the screen
_ShortcutMenuControl.SetShortcutMenuPosition(112, e.NewSize.Width
- 200);
}
}
public void GetShortcutMenuPosition(out double top, out double left)
{
top = ShortcutMenuFloating.PositionTop;
left = ShortcutMenuFloating.PositionLeft;
}
public void SetShortcutMenuPosition(double top, double left)
{
ShortcutMenuFloating.PositionTop = top;
ShortcutMenuFloating.PositionLeft = left;
}