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); }
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); }
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); }
/// <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)); } }