|
@@ -607,23 +607,38 @@ public static class WPFUtils
|
|
|
|
|
|
public static Separator AddSeparator(this ContextMenu menu, int index = -1) => DoAddSeparator(menu, index);
|
|
|
public static Separator AddSeparator(this MenuItem menu, int index = -1) => DoAddSeparator(menu, index);
|
|
|
+ public static Separator AddMenuSeparator(this ItemsControl menu, int index = -1) => DoAddSeparator(menu, index);
|
|
|
+
|
|
|
public static Separator? AddSeparatorIfNeeded(this ContextMenu menu, int index = -1) => DoAddSeparatorIfNeeded(menu, index);
|
|
|
public static Separator? AddSeparatorIfNeeded(this MenuItem menu, int index = -1) => DoAddSeparatorIfNeeded(menu, index);
|
|
|
+ public static Separator? AddMenuSeparatorIfNeeded(this ItemsControl menu, int index = -1) => DoAddSeparatorIfNeeded(menu, index);
|
|
|
+
|
|
|
public static void RemoveUnnecessarySeparators(this ContextMenu menu) => DoRemoveUnnecessarySeparators(menu);
|
|
|
public static void RemoveUnnecessarySeparators(this MenuItem menu) => DoRemoveUnnecessarySeparators(menu);
|
|
|
+ public static void RemoveUnnecessaryMenuSeparators(this ItemsControl menu) => DoRemoveUnnecessarySeparators(menu);
|
|
|
|
|
|
public static MenuItem AddItem(this ContextMenu menu, string caption, Bitmap? image, Action? click, bool enabled = true, int index = -1)
|
|
|
=> DoAddMenuItem(menu, caption, image, click, enabled, index);
|
|
|
public static MenuItem AddItem(this MenuItem menu, string caption, Bitmap? image, Action? click, bool enabled = true, int index = -1)
|
|
|
=> DoAddMenuItem(menu, caption, image, click, enabled, index);
|
|
|
+ public static MenuItem AddMenuItem(this ItemsControl menu, string caption, Bitmap? image, Action? click, bool enabled = true, int index = -1)
|
|
|
+ => DoAddMenuItem(menu, caption, image, click, enabled, index);
|
|
|
+
|
|
|
public static MenuItem AddItem<T>(this ContextMenu menu, string caption, Bitmap? image, T tag, Action<T>? click, bool enabled = true, int index = -1)
|
|
|
=> DoAddMenuItem(menu, caption, image, tag, click, enabled, index);
|
|
|
public static MenuItem AddItem<T>(this MenuItem menu, string caption, Bitmap? image, T tag, Action<T>? click, bool enabled = true, int index = -1)
|
|
|
=> DoAddMenuItem(menu, caption, image, tag, click, enabled, index);
|
|
|
+ public static MenuItem AddMenuItem<T>(this ItemsControl menu, string caption, Bitmap? image, T tag, Action<T>? click, bool enabled = true, int index = -1)
|
|
|
+ => DoAddMenuItem(menu, caption, image, tag, click, enabled, index);
|
|
|
+
|
|
|
public static MenuItem AddCheckItem(this ContextMenu menu, string caption, CheckToggleAction click, bool isChecked = false, bool enabled = true, int index = -1)
|
|
|
=> DoAddCheckItem(menu, caption, click, isChecked, enabled, index);
|
|
|
+ public static MenuItem AddCheckMenuItem(this ItemsControl menu, string caption, CheckToggleAction click, bool isChecked = false, bool enabled = true, int index = -1)
|
|
|
+ => DoAddCheckItem(menu, caption, click, isChecked, enabled, index);
|
|
|
public static MenuItem AddCheckItem<T>(this ContextMenu menu, string caption, T tag, CheckToggleAction<T> click, bool isChecked = false, bool enabled = true, int index = -1)
|
|
|
=> DoAddCheckItem(menu, caption, tag, click, isChecked, enabled, index);
|
|
|
+ public static MenuItem AddCheckMenuItem<T>(this ItemsControl menu, string caption, T tag, CheckToggleAction<T> click, bool isChecked = false, bool enabled = true, int index = -1)
|
|
|
+ => DoAddCheckItem(menu, caption, tag, click, isChecked, enabled, index);
|
|
|
|
|
|
#endregion
|
|
|
}
|