public void BuildContextMenus_Tags() { TagContextMenuItems = new ObservableCollection <System.Windows.Controls.Control>(); var menuitem = new System.Windows.Controls.MenuItem() { Header = "選択中のタグで検索", Command = SearchByTagCommand }; TagContextMenuItems.Add(menuitem); menuitem = new System.Windows.Controls.MenuItem() { Header = "検索結果をクリア", Command = ClearResultSearchingByTagCommand }; TagContextMenuItems.Add(menuitem); menuitem = new System.Windows.Controls.MenuItem() { Header = "表示" }; TagContextMenuItems.Add(menuitem); var sortMenuitem = new System.Windows.Controls.MenuItem() { Header = "ソート" }; menuitem.Items.Add(sortMenuitem); var childMenuitem = new System.Windows.Controls.MenuItem() { Header = "名前 昇順", Command = TagManager.SortByNameAscCommand, }; SetBindingForIsChecked(childMenuitem, "ByNameAsc"); sortMenuitem.Items.Add(childMenuitem); childMenuitem = new System.Windows.Controls.MenuItem() { Header = "名前 降順", Command = TagManager.SortByNameDescCommand }; SetBindingForIsChecked(childMenuitem, "ByNameDesc"); sortMenuitem.Items.Add(childMenuitem); childMenuitem = new System.Windows.Controls.MenuItem() { Header = "カウント 昇順", Command = TagManager.SortByCountAscCommand }; SetBindingForIsChecked(childMenuitem, "ByCountAsc"); sortMenuitem.Items.Add(childMenuitem); childMenuitem = new System.Windows.Controls.MenuItem() { Header = "カウント 降順", Command = TagManager.SortByCountDescCommand }; SetBindingForIsChecked(childMenuitem, "ByCountDesc"); sortMenuitem.Items.Add(childMenuitem); menuitem = new System.Windows.Controls.MenuItem() { Header = "Ex", }; menuitem.SetValue(RegionManager.RegionNameProperty, "ExtraTag"); TagContextMenuItems.Add(menuitem); }
public static void SetArrowSize([NotNull] System.Windows.Controls.MenuItem obj, double value) { ValidationHelper.NotNull(obj, () => obj); obj.SetValue(ArrowSizeProperty, value); }
public static void SetArrowMargin([NotNull] System.Windows.Controls.MenuItem obj, Thickness value) { ValidationHelper.NotNull(obj, () => obj); obj.SetValue(ArrowMarginProperty, value); }
public static void SetBulletSize(System.Windows.Controls.MenuItem obj, double value) { ValidationHelper.NotNull(obj, "obj"); obj.SetValue(BulletSizeProperty, value); }