CoolMenu - How to dynamically load from C#

Feb 8, 2009 at 3:23 PM
hi,

I'm trying to do that :
Menu = new CoolMenu();
Menu.Height = 130;
Menu.MaxItemHeight = 100;
Menu.MaxItemWidth = 100;
BitmapImage Img = new BitmapImage();
Img.UriSource =
new Uri("Images/box.png", UriKind.Relative);
ItemConsult =
new CoolMenuItem();
ItemConsult.Content =
new Image() { Source = Img, Stretch = Stretch.UniformToFill,Margin = new Thickness(5),};
Menu.Items =
new CoolMenuItemCollection();
Menu.Items.Add(ItemConsult);

But at runtime the following error occurs : #4001 AG_E_NETWORKERROR

Please Help!!