예제 #1
0
        void LoadDataCoverFlow()
        {
            List <object> listMenuItem = MenuLoader.LoadMenu(0);

            for (int i = 0; i < listMenuItem.Count; i++)
            {
                MenuItemLvl0 item  = (MenuItemLvl0)listMenuItem[i];
                Image        img   = new Image();
                BitmapImage  bmImg = new BitmapImage(new Uri(item.ImagePathDescription, UriKind.RelativeOrAbsolute));
                img.Source = bmImg;

                Button bt = new Button();
                bt.Width   = 600;
                bt.Height  = 307;
                bt.Margin  = new Thickness(0, 0, 0, 100);
                bt.Content = img;
                bt.Style   = App.Current.Resources["customButtonNoStyle"] as Style;
                listDataCoverFlow.Add(bt);
                bt.Click += new RoutedEventHandler(bt_Click);

                cbbModel.AddImage(listDataCoverFlow[i], new WriteableBitmap(0, 0).FromResource(item.ImagePath));
            }
        }