MethodTaskItemUsages Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies the type of the MethodTaskItem object.
This enumeration supports a bitwise combination of its member values.
public enum class MethodTaskItemUsages
[System.Flags]
public enum MethodTaskItemUsages
type MethodTaskItemUsages =
Public Enum MethodTaskItemUsages
- Inheritance
-
MethodTaskItemUsages
- Attributes
Fields
Name | Value | Description |
---|---|---|
TaskList | 1 | The MethodTaskItem is for a TaskList object. |
ContextMenu | 2 | The MethodTaskItem is for a shortcut menu. |
Examples
The following example sets the MethodTaskItemUsages enumeration to the TaskList type.
MethodTaskItem navigateItem = new MethodTaskItem("Navigate", feature.PageInfo.Title, "Tasks",
feature.PageInfo.Description, feature.PageInfo.SmallImage as Image, feature.PageInfo);
navigateItem.Usage = MethodTaskItemUsages.TaskList;
private void AddFavorites(IList items, MRUList<MRUPageInfo> features) {
IControlPanel controlPanel = (IControlPanel)_serviceProvider.GetService(typeof(IControlPanel));
foreach (MRUPageInfo feature in features) {
if (feature == null) {
continue;
}
if (feature.PageInfo == null) {
feature.PageInfo = GetModulePageInfo(controlPanel, feature.Type);
}
if (feature.PageInfo == null) {
continue;
}
MethodTaskItem navigateItem = new MethodTaskItem("Navigate", feature.PageInfo.Title, "Tasks",
feature.PageInfo.Description, feature.PageInfo.SmallImage as Image, feature.PageInfo);
navigateItem.Usage = MethodTaskItemUsages.TaskList;
items.Add(navigateItem);
}
}