src/EFTools/EntityDesignEntityDesigner/CustomCode/Diagram/EntityTypeElementListCompartment.cs
/// <summary>
///     Gets drawing information for a single list item in the list field.
/// </summary>
/// <param name="listField">The child list field requesting the drawing information.</param>
/// <param name="row">The zero-based row number of the list item to draw.</param>
/// <param name="itemDrawInfo">An ItemDrawInfo that receives the drawing information.</param>
Gets drawing information for a single list item in the list field.
Gets drawing information for a single list item in the list field .
public override void GetItemDrawInfo(ListField listField, int row, ItemDrawInfo itemDrawInfo)
        {
            base.GetItemDrawInfo(listField, row, itemDrawInfo);
            Debug.Assert(ParentShape != null, "ElementListCompartment should be contained in another shape.");
            if (ParentShape != null)
            {
                var ets = ParentShape as EntityTypeShape;
                Debug.Assert(
                    ets != null, "Expected ElementListCompartment's parent type:EntityTypeShape , Actual:" + ParentShape.GetType().Name);
                if (ets != null
                    && ets.Diagram != null)
                {
                    if (ets.Diagram.EmphasizedShapes.Contains(new DiagramItem(this, ListField, new ListItemSubField(row))))
                    {
                        itemDrawInfo.AlternateFont = true;
                    }
                }
            }
        }
public override void GetItemDrawInfo ( ListField listField , int row , ItemDrawInfo itemDrawInfo ) { base . GetItemDrawInfo ( listField , row , itemDrawInfo ) ; Debug . Assert ( ParentShape != null , " " ) ; if ( ParentShape != null ) { var ets = ParentShape as EntityTypeShape ; Debug . Assert ( ets != null , " " + ParentShape . GetType ( ) . Name ) ; if ( ets != null && ets . Diagram != null ) { if ( ets . Diagram . EmphasizedShapes . Contains ( new DiagramItem ( this , ListField , new ListItemSubField ( row ) ) ) ) { itemDrawInfo . AlternateFont = true ; } } } }
Gets drawing information for a single list item in the list field.
Gets drawing information for a single list item in the list field .
//  if the compartment list item is in the EmphasizedShapes list, then set the flag so that the item will be drawn in alternate font. // (The list item's font will be bolded and underlined).
listField
ListField
The child list field requesting the drawing information.
The child list field requesting the drawing information .
row
int
The zero-based row number of the list item to draw.
The zero - based row number of the list item to draw .
itemDrawInfo
ItemDrawInfo
An ItemDrawInfo that receives the drawing information.
An ItemDrawInfo that receives the drawing information .