コード例 #1
0
        private void DropDownButtonClickCommand_Executed(ItemsItemViewModel p)
        {
            if (p == null)
            {
                return;
            }

            string source = "SplitItemsButton -> DropDownButtonClickCommand";

            this.Status = string.Format("Thanks for clicking: '{0} -> {1}'!", source, p.DisplayItemName);
        }
コード例 #2
0
        private void ItemButtonClickCommand_Executed(ItemsItemViewModel p)
        {
            if (p == null)
            {
                return;
            }

            this.IsOpen       = false;
            this.SelectedItem = p;

            string source = "SplitItemsButton -> ItemButtonClickCommand";

            this.Status += Environment.NewLine +
                           string.Format("Thanks for clicking: '{0} -> {1}'!", source, p.DisplayItemName);
        }
コード例 #3
0
        private void ItemButtonClickCommand_Executed(ItemsItemViewModel p)
        {
            if (p == null)
            {
                return;
            }

            // This is the only button specific logic there is -> the rest is demo
            this.IsOpen = false;

            string source = "DropDownItemsButton";

            this.Status += Environment.NewLine +
                           string.Format("Thanks for clicking: '{0} -> {1}'!", source, p.DisplayItemName);
        }
コード例 #4
0
        /// <summary>
        /// Class constructor
        /// </summary>
        public SplitItemsButtonViewModel()
        {
            this.mIsOpen        = false;
            this.mIsEnabled     = true;
            this.mStatus        = string.Empty;
            this.mDropDownItems = new ObservableCollection <ItemsItemViewModel>();

            this.mSelectedItem = new ItemsItemViewModel("Drop Down Items Demo 1");

            this.mDropDownItems.Add(this.mSelectedItem);

            for (int i = 2; i < 255; i++)
            {
                this.mDropDownItems.Add(new ItemsItemViewModel("Drop Down Items Demo " + i));
            }
        }