예제 #1
0
        public CreateNewItemView()
        {
            InitializeComponent();

            //Set ItemsSource for CatagoryCmbBx
            ItemCatagoryDisplay enums = new ItemCatagoryDisplay();

            CatagoryCmbBx.ItemsSource = enums.Catagories;
        }
예제 #2
0
        protected bool IsIndexInRange(int index)
        {
            ItemCatagoryDisplay idc = new ItemCatagoryDisplay();
            int numOfItemCatagories = idc.Catagories.Length;

            if (index < 0 || index >= numOfItemCatagories)
            {
                //failed validation
                ErrorMessage += "Pick an item catagory value.\n";
                return(false);
            }
            return(true);
        }