<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>SL4PopupMenu Discussions Rss Feed</title><link>http://sl4popupmenu.codeplex.com/Thread/List.aspx</link><description>SL4PopupMenu Discussions Rss Description</description><item><title>New Post: SL5 Support?</title><link>http://sl4popupmenu.codeplex.com/discussions/288191</link><description>&lt;div style="line-height: normal;"&gt;I am too facing this problem - &amp;quot;child popup windows doesn't show right next to its parent, there is a horizontal gap of ~100 pixels.&amp;quot;&lt;br /&gt;
&lt;/div&gt;</description><author>manish00gupta00</author><pubDate>Fri, 01 Mar 2013 07:32:16 GMT</pubDate><guid isPermaLink="false">New Post: SL5 Support? 20130301073216A</guid></item><item><title>New Post: why a Slider in menu can not Binding Background.Opacity of layoutRoot,but grdPopupMenu(a grid control)can</title><link>http://sl4popupmenu.codeplex.com/discussions/428710</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;thanks&lt;/p&gt;
&lt;/div&gt;</description><author>xj20305</author><pubDate>Mon, 07 Jan 2013 04:04:57 GMT</pubDate><guid isPermaLink="false">New Post: why a Slider in menu can not Binding Background.Opacity of layoutRoot,but grdPopupMenu(a grid control)can 20130107040457A</guid></item><item><title>New Post: why a Slider in menu can not Binding Background.Opacity of layoutRoot,but grdPopupMenu(a grid control)can</title><link>http://sl4popupmenu.codeplex.com/discussions/428710</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;hi,i have a issue,but my english is ugly.&lt;br&gt;
why a Slider in menu can not Binding Background.Opacity of layoutRoot,but grdPopupMenu(a grid control)can&lt;br&gt;
you know i want to change the Background.Opacity of layoutRoot&lt;br&gt;
the main code as follow&lt;br&gt;
xaml:&lt;br&gt;
&amp;lt;UserControl&lt;br&gt;
xmlns=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;br&gt;
xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;br&gt;
xmlns:d=&amp;quot;http://schemas.microsoft.com/expression/blend/2008&amp;quot;&lt;br&gt;
xmlns:mc=&amp;quot;http://schemas.openxmlformats.org/markup-compatibility/2006&amp;quot;&lt;br&gt;
mc:Ignorable=&amp;quot;d&amp;quot;&lt;br&gt;
x:Class=&amp;quot;PopupMenuApp.UserControl2&amp;quot;&lt;br&gt;
d:DesignWidth=&amp;quot;640&amp;quot; d:DesignHeight=&amp;quot;480&amp;quot;&lt;br&gt;
xmlns:my=&amp;quot;clr-namespace:SL4PopupMenu;assembly=SL4PopupMenu&amp;quot;&lt;br&gt;
&amp;gt;&lt;br&gt;
&lt;br&gt;
&amp;lt;Grid x:Name=&amp;quot;LayoutRoot&amp;quot; Background=&amp;quot;#FFCB6969&amp;quot;&amp;gt;&lt;br&gt;
&amp;lt;Rectangle Fill=&amp;quot;#FFF4F4F5&amp;quot; Height=&amp;quot;98&amp;quot; Margin=&amp;quot;146,108,182,0&amp;quot; Stroke=&amp;quot;Black&amp;quot; VerticalAlignment=&amp;quot;Top&amp;quot;/&amp;gt;&lt;br&gt;
&amp;lt;my:PopupMenu x:Name=&amp;quot;pmMain&amp;quot;&lt;br&gt;
RightClickElements=&amp;quot;LayoutRoot&amp;quot; &lt;br&gt;
AccessShortcut=&amp;quot;Ctrl&amp;#43;Alt&amp;#43;M&amp;quot; &lt;br&gt;
AccessShortcutTargetElementName=&amp;quot;LayoutRoot&amp;quot; &lt;br&gt;
&amp;gt;&lt;br&gt;
&lt;br&gt;
&amp;lt;!--The ItemsControl can also be placed inside a Grid or any other FrameworkElement within the menu--&amp;gt;&lt;br&gt;
&amp;lt;!--In this case the PopupMenu will use the first ItemsControl(lstPopupMenu in our case) it finds in its content--&amp;gt;&lt;br&gt;
&amp;lt;Grid x:Name=&amp;quot;grdPopupMenu&amp;quot; Background=&amp;quot;#FFB01C99&amp;quot; &amp;gt;&lt;br&gt;
&amp;lt;!--See code behind where more items are added to this listbox --&amp;gt;&lt;br&gt;
&amp;lt;ListBox x:Name=&amp;quot;lstPopupMenu&amp;quot; Margin=&amp;quot;20,0,0,0&amp;quot; &amp;gt;&lt;br&gt;
&amp;lt;my:PopupMenuItem x:Name=&amp;quot;pmiCut&amp;quot; Header=&amp;quot;Cut&amp;quot; Tag=&amp;quot;ClipboardMenuTag&amp;quot; ImageSource=&amp;quot;../images/Cut.png&amp;quot; /&amp;gt;&lt;br&gt;
&amp;lt;my:PopupMenuItem x:Name=&amp;quot;pmiCopy&amp;quot; Header=&amp;quot;Copy&amp;quot; Tag=&amp;quot;ClipboardMenuTag&amp;quot; ImageSource=&amp;quot;../images/Copy.png&amp;quot; /&amp;gt;&lt;br&gt;
&amp;lt;!--This implementation provides control over the header content--&amp;gt;&lt;br&gt;
&amp;lt;my:PopupMenuItem x:Name=&amp;quot;pmiPaste&amp;quot; ImageSource=&amp;quot;../images/Paste.png&amp;quot;&amp;gt;&lt;br&gt;
&amp;lt;TextBlock Text=&amp;quot;Paste&amp;quot; Tag=&amp;quot;ClipboardMenuTag&amp;quot;/&amp;gt;&lt;br&gt;
&amp;lt;/my:PopupMenuItem &amp;gt;&lt;br&gt;
&amp;lt;my:PopupMenuSeparator Tag=&amp;quot;ClipboardMenuTag&amp;quot;/&amp;gt;&lt;br&gt;
&amp;lt;my:PopupMenuItem x:Name=&amp;quot;pmiOrientableMenu&amp;quot; Header=&amp;quot;Orientable Menu&amp;quot; CloseOnClick=&amp;quot;False&amp;quot; ImageSource=&amp;quot;../images/4_direction.png&amp;quot; ImageRightSource=&amp;quot;../images/arrow.png&amp;quot; /&amp;gt;&lt;br&gt;
&amp;lt;my:PopupMenuSeparator/&amp;gt;&lt;br&gt;
&amp;lt;/ListBox&amp;gt;&lt;br&gt;
&amp;lt;/Grid&amp;gt;&lt;br&gt;
&amp;lt;/my:PopupMenu&amp;gt;&lt;br&gt;
&amp;lt;Slider x:Name=&amp;quot;stpTransparency&amp;quot; Height=&amp;quot;35&amp;quot; VerticalAlignment=&amp;quot;Center&amp;quot;
&lt;br&gt;
Value=&amp;quot;{Binding Background.Opacity, ElementName=grdPopupMenu, Mode=TwoWay}&amp;quot; Maximum=&amp;quot;1&amp;quot; HorizontalAlignment=&amp;quot;Center&amp;quot; Width=&amp;quot;200&amp;quot;/&amp;gt;&lt;br&gt;
&lt;br&gt;
&amp;lt;/Grid&amp;gt;&lt;br&gt;
&amp;lt;/UserControl&amp;gt;&lt;br&gt;
&lt;br&gt;
csharp code behind:&lt;br&gt;
using System;&lt;br&gt;
using System.Windows;&lt;br&gt;
using System.Windows.Controls;&lt;br&gt;
using System.Windows.Documents;&lt;br&gt;
using System.Windows.Ink;&lt;br&gt;
using System.Windows.Input;&lt;br&gt;
using System.Windows.Media;&lt;br&gt;
using System.Windows.Media.Animation;&lt;br&gt;
using System.Windows.Shapes;&lt;br&gt;
&lt;br&gt;
namespace PopupMenuApp&lt;br&gt;
{&lt;br&gt;
public partial class UserControl2 : UserControl&lt;br&gt;
{&lt;br&gt;
public UserControl2()&lt;br&gt;
{&lt;br&gt;
// 为初始化变量所必需&lt;br&gt;
InitializeComponent();&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
pmMain.AddItem(stpTransparency).CloseOnClick = false; &lt;br&gt;
&lt;br&gt;
}&lt;br&gt;
}&lt;br&gt;
}&lt;/p&gt;
&lt;/div&gt;</description><author>xj20305</author><pubDate>Mon, 07 Jan 2013 04:04:32 GMT</pubDate><guid isPermaLink="false">New Post: why a Slider in menu can not Binding Background.Opacity of layoutRoot,but grdPopupMenu(a grid control)can 20130107040432A</guid></item><item><title>New Post: SL5 Support?</title><link>http://sl4popupmenu.codeplex.com/discussions/288191</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;It compiles, but there are some glitches - for instance, child popup windows doesn't show right next to its parent, there is a horizontal gap of ~100 pixels.&lt;/p&gt;&lt;/div&gt;</description><author>skalkin</author><pubDate>Fri, 27 Jul 2012 00:53:15 GMT</pubDate><guid isPermaLink="false">New Post: SL5 Support? 20120727125315A</guid></item><item><title>New Post: ScrollViewer in Long PopupMenu</title><link>http://sl4popupmenu.codeplex.com/discussions/360931</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Hi Hemant,&lt;/p&gt;
&lt;p&gt;To get scrolling ability you can just add your items to a Listbox and enable its built in vertical scrollbar.&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;
&lt;p&gt;Ziad&lt;/p&gt;&lt;/div&gt;</description><author>ZiadJ</author><pubDate>Tue, 26 Jun 2012 12:33:02 GMT</pubDate><guid isPermaLink="false">New Post: ScrollViewer in Long PopupMenu 20120626123302P</guid></item><item><title>New Post: ScrollViewer in Long PopupMenu</title><link>http://sl4popupmenu.codeplex.com/discussions/360931</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Hi Ziad,&lt;/p&gt;
&lt;p&gt;I am using SL4 Popupmenu control. My Popup menu generates a long list of PopupMenuItem. You know browser Height is fixed hence few portion of PopupMenu is not visible. Is it possible to provide ScrollVeiwer so that User can scroll to the&amp;nbsp;last PopupMenuitem
 in case Height of PopupMenu generated is greater than Browser Height.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks &amp;amp; Regards,&lt;/p&gt;
&lt;p&gt;Hemant&lt;/p&gt;
&lt;/div&gt;</description><author>hemant2701</author><pubDate>Tue, 26 Jun 2012 08:25:25 GMT</pubDate><guid isPermaLink="false">New Post: ScrollViewer in Long PopupMenu 20120626082525A</guid></item><item><title>New Post: Icon is not displaying through code in PopupMenu in SL4 BA</title><link>http://sl4popupmenu.codeplex.com/discussions/282533</link><description>&lt;div style="line-height: normal;"&gt;&lt;blockquote style="padding-bottom: 0px; font-style: italic; margin: 0.25em 1em 0px; padding-left: 0.25em; padding-right: 0.25em; padding-top: 0px; border: #ccc 0.1em solid;"&gt;&lt;strong&gt;ZiadJ wrote:&lt;/strong&gt;&lt;br /&gt;
&lt;p&gt;I still haven't found a clean solution to the problem and all I could to do is make the code behind approach a little less invasive by using the following static method:&lt;/p&gt;
&lt;pre style="font-family: Consolas; background: white; color: black;"&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;static&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;void&lt;/span&gt;&amp;nbsp;PreloadMenuImages(&lt;span style="color: #2b91af;"&gt;Image&lt;/span&gt;&amp;nbsp;imageLoader)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;foreach&lt;/span&gt;&amp;nbsp;(&lt;span style="color: blue;"&gt;var&lt;/span&gt;&amp;nbsp;item&amp;nbsp;&lt;span style="color: blue;"&gt;in&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;PopupMenuManager&lt;/span&gt;.MenuTriggers
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Select(mt&amp;nbsp;=&amp;gt;&amp;nbsp;mt.PopupMenuBase).OfType&amp;lt;&lt;span style="color: #2b91af;"&gt;PopupMenu&lt;/span&gt;&amp;gt;()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .SelectMany(m&amp;nbsp;=&amp;gt; m.Items).OfType&amp;lt;&lt;span style="color: #2b91af;"&gt;PopupMenuItem&lt;/span&gt;&amp;gt;())
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;imageLoader.Source&amp;nbsp;=&amp;nbsp;item.ImageSource;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;imageLoader.Source&amp;nbsp;=&amp;nbsp;item.ImageRightSource;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
}&lt;/pre&gt;
&lt;p&gt;To start with make sure you have a dummy Image control in your page named, say imgLoader, so that you can pass it as parameter in the new method.&lt;/p&gt;
&lt;p&gt;Then simply call it once your menus have been generated. All it does is loop through every image in your menus and loads them in your app via the dummy image control.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;br /&gt;Hi Ziad,&lt;/p&gt;
&lt;p&gt;Just want to inform you that above mentioned issue is not occuring in Silverlight 5. I have upgraded my project from SL4 to SL5 and now Icon is displayed through XAML and Code. I guess there is some issue with SL4&amp;nbsp; Business application.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description><author>hemant2701</author><pubDate>Tue, 26 Jun 2012 08:15:32 GMT</pubDate><guid isPermaLink="false">New Post: Icon is not displaying through code in PopupMenu in SL4 BA 20120626081532A</guid></item><item><title>New Post: Debug.Write still in production version</title><link>http://sl4popupmenu.codeplex.com/discussions/348894</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Just to inform you that you've missed a &amp;quot;Debug.WriteLine(DateTime.Now.ToString());&amp;quot; line in the Close() method (in PopupMenuBase)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;and ... thank you very much for this 'Must Have'&lt;/p&gt;
&lt;p&gt;Crusty Applesniffer&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;</description><author>CrustyApplesniffe</author><pubDate>Fri, 16 Mar 2012 14:24:25 GMT</pubDate><guid isPermaLink="false">New Post: Debug.Write still in production version 20120316022425P</guid></item><item><title>New Post: How to make it scrollable?</title><link>http://sl4popupmenu.codeplex.com/discussions/343272</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Thanks Ziad that fixed it&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;&lt;/div&gt;</description><author>MahmoudElBarbary</author><pubDate>Tue, 28 Feb 2012 08:56:28 GMT</pubDate><guid isPermaLink="false">New Post: How to make it scrollable? 20120228085628A</guid></item><item><title>New Post: How to make it scrollable?</title><link>http://sl4popupmenu.codeplex.com/discussions/343272</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Ok thanks Mahmoud, this update should fix it:&lt;/p&gt;
&lt;div style="color: black; background-color: white;"&gt;
&lt;pre&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt; (&lt;span style="color: blue;"&gt;this&lt;/span&gt;.Container != &lt;span style="color: blue;"&gt;null&lt;/span&gt;) 
{
	&lt;span style="color: blue;"&gt;var&lt;/span&gt; container = &lt;span style="color: blue;"&gt;this&lt;/span&gt;.Container;

	container.Dispatcher.BeginInvoke(&lt;span style="color: blue;"&gt;delegate&lt;/span&gt;
	{
		 container.IsEnabled = &lt;span style="color: blue;"&gt;this&lt;/span&gt;.IsEnabled; 
	});
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;I haven't tested it myself though so I'm leaving that on you.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description><author>ZiadJ</author><pubDate>Mon, 27 Feb 2012 13:36:34 GMT</pubDate><guid isPermaLink="false">New Post: How to make it scrollable? 20120227013634P</guid></item><item><title>New Post: How to make it scrollable?</title><link>http://sl4popupmenu.codeplex.com/discussions/343272</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Hi ZiadJ,&lt;/p&gt;
&lt;p&gt;The null reference exception appears in the underlined red line&lt;/p&gt;
&lt;p&gt;
&lt;div style="color: black; background-color: white;"&gt;
&lt;pre&gt;                &lt;span style="color: blue;"&gt;if&lt;/span&gt; (&lt;span style="color: blue;"&gt;this&lt;/span&gt;.Container != &lt;span style="color: blue;"&gt;null&lt;/span&gt;) &lt;span style="color: green;"&gt;// Don't bother calling synchContainerState if the container does not yet exist since it will eventually be called in OnApplyTemplate.&lt;/span&gt;
                {
                    &lt;span style="color: blue;"&gt;this&lt;/span&gt;.Container.IsEnabled = &lt;span style="color: blue;"&gt;this&lt;/span&gt;.IsEnabled; &lt;span style="color: green;"&gt;// Sync the container state.&lt;/span&gt;

                    &lt;span style="color: blue;"&gt;this&lt;/span&gt;.Container.Dispatcher.BeginInvoke(&lt;span style="color: blue;"&gt;delegate&lt;/span&gt;
                    {
                       &lt;span style="text-decoration: underline; color: #ff0000;"&gt;this.Container.IsEnabled = this.IsEnabled;&lt;/span&gt; &lt;span style="color: green;"&gt;// Sync the container state.&lt;/span&gt;
                    });
                }
&lt;/pre&gt;
&lt;/div&gt;
and the null object is [&lt;span style="text-decoration: underline; color: #ff0000;"&gt;this.Container&lt;/span&gt;]&lt;/p&gt;
&lt;p&gt;﻿that exception appears only upon scrolling the context menu.&lt;/p&gt;
&lt;p&gt;Thanks for your help&lt;/p&gt;&lt;/div&gt;</description><author>MahmoudElBarbary</author><pubDate>Mon, 27 Feb 2012 09:06:36 GMT</pubDate><guid isPermaLink="false">New Post: How to make it scrollable? 20120227090636A</guid></item><item><title>New Post: How to make it scrollable?</title><link>http://sl4popupmenu.codeplex.com/discussions/343272</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;That's weird because the code starts with&lt;span style="color: blue;"&gt; if&lt;/span&gt; (&lt;span style="color: blue;"&gt;this&lt;/span&gt;.Container != &lt;span style="color: blue;"&gt;null&lt;/span&gt;) which is there to make sure that the value is not null beforehand.&lt;/p&gt;
&lt;p&gt;I'm missing something here. Can you give me more details on which property is null and on which line?&lt;/p&gt;
&lt;p&gt;Otherwise this shouldn't introduce any major bugs. At worst the menu items might not go into disabled mode when IsEnabled is false.&lt;/p&gt;
&lt;div id="divLookup" style="background-color: #ffff77; color: #000000; top: 122px; left: 60px; padding: 3px; z-index: 10000; border-radius: 3px 3px 3px 3px;"&gt;&lt;img src="data:image/gif,GIF89a%12%00%12%00%B3%00%00%FF%FF%FF%F7%F7%EF%CC%CC%CC%BD%BE%BD%99%99%99ZYZRUR%00%00%00%FE%01%02%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00!%F9%04%04%14%00%FF%00%2C%00%00%00%00%12%00%12%00%00%04X0%C8I%2B%1D8%EB%3D%E4%00%60(%8A%85%17%0AG*%8C%40%19%7C%00J%08%C4%B1%92%26z%C76%FE%02%07%C2%89v%F0%7Dz%C3b%C8u%14%82V5%23o%A7%13%19L%BCY-%25%7D%A6l%DF%D0%F5%C7%02%85%5B%D82%90%CBT%87%D8i7%88Y%A8%DB%EFx%8B%DE%12%01%00%3B" border="0" alt="" /&gt;&lt;/div&gt;&lt;/div&gt;</description><author>ZiadJ</author><pubDate>Mon, 27 Feb 2012 01:26:08 GMT</pubDate><guid isPermaLink="false">New Post: How to make it scrollable? 20120227012608A</guid></item><item><title>New Post: How to make it scrollable?</title><link>http://sl4popupmenu.codeplex.com/discussions/343272</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Dear ZiadJ,&lt;/p&gt;
&lt;p&gt;Thanks for your help , i now have a new requirement i wanted to generate the popup menu dynamically, so i did the following&lt;/p&gt;
&lt;p&gt;&amp;nbsp; subsubmenu.ItemsControl.MaxHeight = 250;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; subsubmenu.Width = 150;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;that made the scroll bar appear, but generated null reference exception upon scrolling at line [this.Container.IsEnabled = this.IsEnabled;] in code snippet&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div style="color: black; background-color: white;"&gt;
&lt;pre&gt;                &lt;span style="color: blue;"&gt;if&lt;/span&gt; (&lt;span style="color: blue;"&gt;this&lt;/span&gt;.Container != &lt;span style="color: blue;"&gt;null&lt;/span&gt;) &lt;span style="color: green;"&gt;// Don't bother calling synchContainerState if the container does not yet exist since it will eventually be called in OnApplyTemplate.&lt;/span&gt;
                {
                    &lt;span style="color: blue;"&gt;this&lt;/span&gt;.Container.IsEnabled = &lt;span style="color: blue;"&gt;this&lt;/span&gt;.IsEnabled; &lt;span style="color: green;"&gt;// Sync the container state.&lt;/span&gt;

                    &lt;span style="color: blue;"&gt;this&lt;/span&gt;.Container.Dispatcher.BeginInvoke(&lt;span style="color: blue;"&gt;delegate&lt;/span&gt;
                    {
                        &lt;span style="color: blue;"&gt;this&lt;/span&gt;.Container.IsEnabled = &lt;span style="color: blue;"&gt;this&lt;/span&gt;.IsEnabled; &lt;span style="color: green;"&gt;// Sync the container state.&lt;/span&gt;
                    });
                }&lt;/pre&gt;
&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;pre&gt;So i commented these lines of codes and everything went fine&lt;/pre&gt;
&lt;pre&gt;Is what i did right and this won't generate further bugs in the future? Or can you help me with another workaround?&lt;/pre&gt;
&lt;pre&gt;Thanks in advance&lt;/pre&gt;
&lt;br /&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description><author>MahmoudElBarbary</author><pubDate>Sun, 26 Feb 2012 14:02:25 GMT</pubDate><guid isPermaLink="false">New Post: How to make it scrollable? 20120226020225P</guid></item><item><title>New Post: How to get the position of the PopupMenu</title><link>http://sl4popupmenu.codeplex.com/discussions/339937</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;That's cool. Thank you so much. On the way, I'll give it a try and udpate back.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;/div&gt;</description><author>truyenle</author><pubDate>Fri, 24 Feb 2012 18:08:09 GMT</pubDate><guid isPermaLink="false">New Post: How to get the position of the PopupMenu 20120224060809P</guid></item><item><title>New Post: How to get the position of the PopupMenu</title><link>http://sl4popupmenu.codeplex.com/discussions/339937</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Have you downloaded the source code version of the menu?&lt;/p&gt;
&lt;p&gt;If so I suggest you add the required property to the PopupMenuBase class as follows:&lt;/p&gt;
&lt;p&gt;public bool Position&lt;br /&gt; {&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; get{return(bool)GetValue(PositionProperty);}&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; set{SetValue(PositionProperty, value);}&lt;br /&gt; }&lt;br /&gt; &lt;br /&gt; public static readonly DependencyPropertyPositionProperty = DependencyProperty.Register("Position", typeof(bool), typeof(PopupMenuBase), new PropertyMetadata(false, (sender, e)=&amp;gt;&lt;br /&gt; {&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; var pmb = sender as PopupMenuBase;&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; return pmb.ContentRoot.Margin;&lt;br /&gt; }));&lt;/p&gt;
&lt;p&gt;This should make it accessible from within your view.&lt;/p&gt;
&lt;p&gt;I still have to try it myself though.&lt;/p&gt;
&lt;p&gt;PS.&lt;/p&gt;
&lt;p&gt;If you don't have access to the source code then implementing it in a partial class should be ok I guess.&lt;/p&gt;&lt;/div&gt;</description><author>ZiadJ</author><pubDate>Fri, 24 Feb 2012 17:52:36 GMT</pubDate><guid isPermaLink="false">New Post: How to get the position of the PopupMenu 20120224055236P</guid></item><item><title>New Post: How to make it scrollable?</title><link>http://sl4popupmenu.codeplex.com/discussions/343272</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Thanks for your appreciation.&lt;/p&gt;
&lt;p&gt;Have you tried it with a ListBox instead?&lt;/p&gt;
&lt;p&gt;This should work fine:&lt;/p&gt;
&lt;p&gt;
&lt;div style="color: black; background-color: white;"&gt;
&lt;pre&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;ListBox&lt;/span&gt; &lt;span style="color: red;"&gt;ScrollViewer.VerticalScrollBarVisibility&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;True&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    ...&lt;br /&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;ListBox&lt;/span&gt;&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;

&lt;/pre&gt;
&lt;/div&gt;
&lt;/p&gt;&lt;/div&gt;</description><author>ZiadJ</author><pubDate>Fri, 24 Feb 2012 17:30:35 GMT</pubDate><guid isPermaLink="false">New Post: How to make it scrollable? 20120224053035P</guid></item><item><title>New Post: How to get the position of the PopupMenu</title><link>http://sl4popupmenu.codeplex.com/discussions/339937</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Thank for your response.&lt;/p&gt;
&lt;p&gt;If we use MVVM model and want to use an ICommand. how can we have this info in the View (XAML) and then pass to the command in the CommandParameter?&lt;/p&gt;
&lt;p&gt;Well, don't want to use code behind.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank again for a nice menu.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Truyen&lt;/p&gt;&lt;/div&gt;</description><author>truyenle</author><pubDate>Fri, 24 Feb 2012 17:26:55 GMT</pubDate><guid isPermaLink="false">New Post: How to get the position of the PopupMenu 20120224052655P</guid></item><item><title>New Post: PopUpMenu on DataGrid columns</title><link>http://sl4popupmenu.codeplex.com/discussions/343257</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;You can add a tag, say 'hasMenu', to the datagrid columns or each cell within it and then use RightCickElements = '.hasMenu' to associate the menu with them at startup. Note the use of the prefix '.' when you intend to target the tag property.&lt;/p&gt;
&lt;p&gt;If you're ok with using code behind then the AddTrigger method should get you going.&lt;/p&gt;
&lt;p&gt;However if you need more control you can also use the GetClickedElements&amp;lt;T&amp;gt; function(see Demo1) to determine which control was clicked and cancel the opening event using the IsOpenCancelled from there.&lt;/p&gt;
&lt;div id="divLookup" style="background-color: #ffff77; color: #000000; top: 92px; left: 479px; padding: 3px; z-index: 10000; border-radius: 3px 3px 3px 3px;"&gt;&lt;img src="data:image/gif,GIF89a%12%00%12%00%B3%00%00%FF%FF%FF%F7%F7%EF%CC%CC%CC%BD%BE%BD%99%99%99ZYZRUR%00%00%00%FE%01%02%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00!%F9%04%04%14%00%FF%00%2C%00%00%00%00%12%00%12%00%00%04X0%C8I%2B%1D8%EB%3D%E4%00%60(%8A%85%17%0AG*%8C%40%19%7C%00J%08%C4%B1%92%26z%C76%FE%02%07%C2%89v%F0%7Dz%C3b%C8u%14%82V5%23o%A7%13%19L%BCY-%25%7D%A6l%DF%D0%F5%C7%02%85%5B%D82%90%CBT%87%D8i7%88Y%A8%DB%EFx%8B%DE%12%01%00%3B" border="0" alt="" /&gt;&lt;/div&gt;&lt;/div&gt;</description><author>ZiadJ</author><pubDate>Fri, 24 Feb 2012 17:11:39 GMT</pubDate><guid isPermaLink="false">New Post: PopUpMenu on DataGrid columns 20120224051139P</guid></item><item><title>New Post: How to get the position of the PopupMenu</title><link>http://sl4popupmenu.codeplex.com/discussions/339937</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;This is a good question actually since this information is not accessible right away.&lt;/p&gt;
&lt;p&gt;You'll get the position by accessing the margin of the root control for the menu content ContentRoot as such:&lt;span style="color: blue;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: blue;"&gt;var&lt;/span&gt; position = pm.ContentRoot.Margin;&lt;/p&gt;
&lt;p&gt;Thanks for asking...I'll definitely make this more obvious in later versions.&lt;/p&gt;
&lt;p&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;/p&gt;&lt;/div&gt;</description><author>ZiadJ</author><pubDate>Fri, 24 Feb 2012 16:50:47 GMT</pubDate><guid isPermaLink="false">New Post: How to get the position of the PopupMenu 20120224045047P</guid></item><item><title>New Post: How to make it scrollable?</title><link>http://sl4popupmenu.codeplex.com/discussions/343272</link><description>&lt;div style="line-height: normal;"&gt;
&lt;pre&gt;I have downloaded and used the SL4PopupMenu and its really great.
But codeplex says it's scrollable, however i cannot find out how to make it scrollable, i tried adding ScrollViewer to ItemsPresenters but it didn't work, here is what i did:
                            &amp;lt;ScrollViewer VerticalScrollBarVisibility=&amp;quot;Auto&amp;quot; Height=&amp;quot;80&amp;quot; MaxHeight=&amp;quot;50&amp;quot;&amp;gt;
                                &amp;lt;ItemsPresenter Grid.ColumnSpan=&amp;quot;2&amp;quot; Margin=&amp;quot;{TemplateBinding Padding}&amp;quot;/&amp;gt;
                            &amp;lt;/ScrollViewer&amp;gt;
so can any one help me?&lt;/pre&gt;
&lt;/div&gt;</description><author>MahmoudElBarbary</author><pubDate>Thu, 23 Feb 2012 13:48:19 GMT</pubDate><guid isPermaLink="false">New Post: How to make it scrollable? 20120223014819P</guid></item></channel></rss>