{
public HideItemsControll()
{
InitializeComponent();
RegisterActions(components);
}
protected override void OnActivated()
{
base.OnActivated();
CollectCreatableItemTypes += new EventHandler
}
void HideItemsControll_CollectCreatableItemTypes(object sender, CollectTypesEventArgs e)
{
CustomizeList(e.Types);
}
public void CustomizeList(ICollection
{
//Get the ShowNavigationItemController, then get its ShowNavigationItemAction
SingleChoiceAction showNavigationItemAction = Frame.GetController
//Get the item selected in the navigation control
ChoiceActionItem selectedItem = showNavigationItemAction.SelectedItem;
ChoiceActionItem currentGroup = null;
if (selectedItem != null)
{
//Get the selected item's parent group
currentGroup = selectedItem.ParentItem;
List
//Collect the types that must be deleted
foreach (Type type in types)
{
//bool deletionRequired = true;
if (type.Name.Equals("BillByBill"))
{
unusableTypes.Add(type);
}
if (type.Name.Equals("AccountIntrest"))
{
unusableTypes.Add(type);
}
foreach (Type type in unusableTypes)
types.Remove(type);
}}}
No comments:
Post a Comment