Hi,
I have a problem adding items programatically.
Only appears one, the first, and I don't know why:
XamWebMenu menu = new XamWebMenu() { MenuOrientation = Orientation.Vertical, VerticalAlignment = VerticalAlignment.Top, HorizontalAlignment = HorizontalAlignment.Stretch, HorizontalContentAlignment = HorizontalAlignment.Left, ExpandOnHover = true, Foreground = Brushes.Black, Background = (Brush)Application.Current.Resources[ "MenuBackGround" ] }; Image simpleImage = new Image(); BitmapImage bimg = new BitmapImage(); bimg.UriSource = new Uri( "../Images/Icons/DocumentHS.png", UriKind.RelativeOrAbsolute ); simpleImage.Source = bimg; simpleImage.Stretch = Stretch.None; menu.Items.Add( new XamWebMenuItem() { MenuOrientation = Orientation.Vertical, Header = "Add", Name = "Add", HorizontalAlignment = HorizontalAlignment.Left, Icon = simpleImage } ); simpleImage = new Image(); bimg = new BitmapImage(); bimg.UriSource = new Uri( "../Images/Icons/gears_run.png", UriKind.RelativeOrAbsolute ); simpleImage.Source = bimg; simpleImage.Stretch = Stretch.None; menu.Items.Add( new XamWebMenuItem() { MenuOrientation = Orientation.Vertical, Header = "Actions", Name = "Actions", HorizontalAlignment = HorizontalAlignment.Left, Icon = simpleImage } );
Am I missing any option?
Cheers.
I don’t see anything wrong, but you set MenuOrientation = Orientation.Vertical. Please see the Height of the container where the menu resides. If the Height is set to fixed value, and the menu’s height is bigger than the height of the container that is why you can’t see the rest of items.