RegisterManager/UnregisterManager

Topics: CAB & Smart Client Software Factory
Jun 25, 2005 at 10:55 AM
originally posted by: aaguiarz

When doing:

ServiceDependency
public IUIElementService UIService;

...
IUIElementManager managerTaskPane = new UIToolbarManager(new Uri("uie://formtoolbar"), formToolBar);
UIService.RegisterManager(managerTaskPane);
UIService.UnregisterManager(new Uri("uie://formtoolbar"));

If it's done inside a Controller (or anywhere in the context of a WorkItem), the UnregisterManager does not unregister it, because it uses the UnregisterManager in WorkItemUIElementServiceProxy:

public void UnregisterManager(Uri uri)
{
RootService.UnregisterManager(GetTranslatedUri(uri));
}

So, it translates the Uri, and then it cannot find it.

Am I doing something wrong?

Thanks
Jun 25, 2005 at 5:20 PM
originally posted by: aaguiarz

Never mind... Even if it looks like a bug, my design was wrong. I don't need to call UnregisterManager anymore.

Thanks