Autodesk Vault ProfessionalVault API

AddEntityStyleHandler Method

Autodesk.DataManagement.Client.Framework.Vault.Forms.ServicesIEntityStyleService

Registers a delegate which will provide a Style for all properties of an Entity

Syntax

void AddEntityStyleHandler(
   System.Action<Style,IEntity> GetEntityStyleHandler,
   System.bool clearExisting
)
Sub AddEntityStyleHandler( _
   ByVal GetEntityStyleHandler As System.Action(Of Style,IEntity), _
   Optional ByVal clearExisting As System.Boolean _
) 

Parameters

NameDescription
GetEntityStyleHandlerThe delegate which implements the function to configure the style
clearExistingTrue if the supplied delegate should replace all existing delegates, or if it should be appended to a list.

Example

public void GetEntityStyleDelegate(Currency.Style style, Entities.IEntity entity)
{
   FileIteration file = entity as FileIteration;
   if (file != null & file.IsCheckedOut)
      style.ForeColor = Color.Red;
}

See Also