예제 #1
0
        private void Btn_AddDecor_Click(object sender, RoutedEventArgs e)
        {
            Decoration fd = new Decoration {
                decorationName = "Edit.."
            };

            App._decorations.Add(fd);
            Lbx_Decor.SelectedItem = fd;
            Lbx_Decor.ScrollIntoView(fd);
        }
예제 #2
0
        private void CoBx_decorItem_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (CoBx_decorItem.SelectedItem == null)
            {
                return;
            }
            var cs2 = from f in decorations where f.decorationName == CoBx_decorItem.SelectedItem.ToString() select f;

            Lbx_decorCart.ItemsSource = cs2;

            Decoration result = CoBx_decorItem.SelectedItem as Decoration;

            if (_decorationList != null)
            {
                _decorationList.Add(result);
            }
            else
            {
                _decorationList = new ObservableCollection <Decoration>();
                _decorationList.Add(result);
            }
            Lbx_decorCart.ItemsSource = _decorationList;
        }