01-15-2008 08:59 AM
Published 04 October 07 12:42 PM
Now that ACT! 2008 has been released, I thought I'd post about creating custom dashboard components.
New to ACT! 2008 is the Dashboard view. It shows up in the navigation bar on the left side of the application shell as Dashboard.
Just like contacts, groups and companies in ACT!, the new Dashboard has a designer. This designer allows administrators to create custom dashboard layouts. You can determine the number of rows and columns and the size of the components. The dashboard components that ship with ACT! 2008 are available to be put on a dashboard layout. Also in the designer is a tab in the toolbox for custom dashboard components. These are components that SDK developers can create.
The minimum requirement for a class to participate in the dashboard as a custom component is to add an attribute to your class called Act.Shared.ComponentModel.CustomDashboardComponent, set it's value to true, and implement IComponent.
Typical use cases though would be create a subclass of System.Windows.Forms.UserControl and implement Act.Framework.ComponentModel.Core.Dashboard.IFrameworkDashboardBoundControl or to derive from Act.Framework.ComponentModel.Core.Dashboard.BaseComponent.
Those of you who have created custom layout designer controls will notice this is very similar to that.
BaseComponent provides the elements that are standard on the ACT! dashboard components. This includes a header, filter button and text, a footer, and a center panel to put custom content. It also implements IFrameworkDashboardBoundControl for you so all you have to do is override two virtual methods to sign up for events that your control would want to know about. You would derive from BaseComponent if you want your custom dashboard component to share the same look and feel as the ACT! dashboard components.
You would derive from UserControl if you wanted complete control over the look of your dashboard component and didn't need the features provided by BaseComponent.
After you design your component you put it in the Tools directory under the ACT! install directory. This is the same location that custom layout controls go now.
The ACT! Dashboard Designer will attempt to load the assemblies in the Tools directory and look for types in the assembly that have the CustomDashboardComponent attribute on them. Those components will then be dynamically added to the custom section of the toolbox in the designer. All you need to do then is drop the component on the form and save the dashboard. After you close the designer ACT! will reload the current dashboard and if your component was added to the current dashboard it will be created and added to the dashboard.
This was an overview of how to create custom dashboard components. Next I'll be adding some blog entries going over how to derive from BaseComponent, one on implementing IFrameworkDashboardBoundControl, and one on debugging custom dashboard components.
05-20-2008 05:21 AM