Example #1
0
 public NavigationItem(string text, Type targetType, string image, Color color, bool showFlyout, NavigationItem parent)
 {
     Parent = parent;
     Text   = text;
     NavigationTargetType = targetType;
     Color              = color;
     Image              = "ms-appx:///NavigationDemo/Images/" + image + ".svg";
     ShowFlyout         = showFlyout;
     SubItems           = new ObservableCollection <NavigationItem>();
     SubMenuOrientation = Orientation.Horizontal;
 }
Example #2
0
 static NavigationItem GenerateNavigationItem(string text, Type navigationTarget, NavigationItem parent = null)
 {
     return(new NavigationItem(text, navigationTarget, images[random.Next(images.Length)],
                               colors[random.Next(colors.Length)], parent == null && random.Next(2) == 1, parent));
 }