public static void AddFolderWindowTest01() { List <Folder> f = DBfunc.ReadFoodFolders(); AddFolderWindow page = new AddFolderWindow(f[0]); page.ShowDialog(); }
private void Repaint() { panelFolders.Children.Clear(); lst = DBfunc.ReadFoodFolders(); StackPanel sp = new StackPanel(); int cnt = 0; foreach (var x in lst) { if (cnt % 10 == 0) { sp = new StackPanel(); sp.Orientation = Orientation.Horizontal; panelFolders.Children.Add(sp); } Frame myFrame = new Frame(); myFrame.Margin = new Thickness(20, 20, 20, 20); myFrame.Navigate(new ItemFrige(x)); sp.Children.Add(myFrame); cnt++; } }
private void Window_Loaded(object sender, RoutedEventArgs e) { List <Folder> lst = DBfunc.ReadFoodFolders(); ids = new int[lst.Count]; for (int i = 0; i < lst.Count; i++) { ids[i] = lst[i].id; comboFolders.Items.Add(lst[i].title); } comboFolders.SelectedIndex = 0; }