Quantcast
Channel: Silverlight Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 801

Closed Issue: context menu truncated / cut off [11070]

$
0
0
<p>Vote As Helpful </p>
<p>&#160;</p>
<p>Based on a forum thread http://social.msdn.microsoft.com/Forums/en-US/wpdevelop/thread/2c66431b-b161-4be1-992a-af0903a7c829</p>
<p>&#160;</p>
<p>It would seem that version 7.1 of the toolkit has introduced a small but very annoying flaw in the ContextMenu. This problem did not exist (or show itself) in version 7.0. Here's the problem: I am using the ContextMenu for the items in a ListBox. When the height of the context menu exceeds half the screen height (in my case six menu items or more for a ListBox used in a PivotItem), the lower part of the context menu disappears off the bottom of the screen (gets cut off) when you tap &amp; hold a list box item in the middle of the screen. The reason being that the height of the context menu is too large to be fully displayed above or below the tap position. At this point, a fallback mechanism kicks in that is meant to reposition the context menu so that it can be fully displayed. This mechanism has a bug.</p>
<p>&#160;</p>
<p> I think found a fix for this bug: It's in line 1008 of the method Microsoft.Phone.Controls.ContextMenu.UpdateContextMenuPlacement. The code line in red is missing. Once you add this line, the context menu works perfectly.</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p> ... </p>
<p> if (p.Y &gt; (bounds.Bottom - ActualHeight)) </p>
<p> { </p>
<p> // Expand upwards at touch position </p>
<p> p.Y = _popupAlignmentPoint.Y - ActualHeight; </p>
<p> _reversed = true; </p>
<p> </p>
<p> if (p.Y &lt; bounds.Top) </p>
<p> { </p>
<p> p.Y = bounds.Bottom - ActualHeight; </p>
<p> _reversed = true; </p>
<p> } </p>
<p> } </p>
<p> ... </p>
<p> </p>
<p>&#160;</p>
<p> </p>
<p> </p>
<p> </p>
<p>Of couse you need to download the toolkit source code and recompile the toolkit to fix this problem in your project.</p>
Comments:

Closing all issues marked as fixed, dupe or no repro for the Windows Phone Toolkit September 2012 release.


Viewing all articles
Browse latest Browse all 801

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>