public CollectionItem(CollectionCompleteInfo info, SnippetsPage page, NavBarSnippet nav)
        {
            InitializeComponent();
            Info = info;
            Page = page;
            Nav  = nav;

            //Set expand button
            Container.Visibility = Visibility.Collapsed;
            Expand.Content       = "Expand";

            //Set default collection info
            Name.Content       = Info.collectioninfo.Name;
            CreateDate.Content = Info.collectioninfo.CreateDate;

            //Set All Snippet Items
            Container.Children.Clear();
            foreach (SnippetInfo i in Info.snippets)
            {
                SnippetItem item = new SnippetItem(i, Page, Nav)
                {
                    Width = Container.Width
                };
                Container.Children.Add(item);
            }
        }
Exemple #2
0
        //Main
        public SnippetItem(SnippetInfo info, SnippetsPage page, NavBarSnippet navbar)
        {
            InitializeComponent();

            Info = info;
            Page = page;

            Name.Content       = info._Name;
            Language.Content   = DbCodeLanguage.ToString(info._LanguageID);
            CreateDate.Content = info._CreateDate;
            Navbar             = navbar;
        }
Exemple #3
0
        //Side-Menu-Handling
        private void NavSnippet_Click(object sender, RoutedEventArgs e)
        {
            Contentt.Children.Clear();
            NavigationBar.Children.Clear();

            SnippetsPage snip = new SnippetsPage();

            Contentt.Children.Add(snip);
            snip.Width  = Contentt.Width;
            snip.Height = Contentt.Height;

            NavBarSnippet nav = new NavBarSnippet(snip);

            NavigationBar.Children.Add(nav);
        }