FontsAndColorsItems.Count Property
Gets a value indicating the number of objects in the FontsAndColorsItems collection.
Namespace: EnvDTE
Assembly: EnvDTE (in EnvDTE.dll)
Syntax
'Declaration
ReadOnly Property Count As Integer
int Count { get; }
property int Count {
int get ();
}
abstract Count : int
function get Count () : int
Property Value
Type: System.Int32
An integer value indicating the numbers of objects in the FontsAndColorsItems collection.
Examples
public void CodeExample(DTE2 dte, AddIn addin)
{ // Make sure you have an open solution
try
{
Properties props;
Property prop;
FontsAndColorsItems fci;
ColorableItems ci;
string msg = "";
props = dte.get_Properties("FontsAndColors", "TextEditor");
prop = props.Item("FontsAndColorsItems");
fci = (FontsAndColorsItems)prop.Object;
ci = fci.Item(1);
msg += "Count of ColorableItems in fci: " + fci.Count + "\n";
msg += "The first ColorableItems object in fci is " + ci.Name;
MessageBox.Show(msg);
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Other Resources
How to: Compile and Run the Automation Object Model Code Examples