MonobjcMonobjc Documented Class Library
SizeWithAttributes Method (__target, attributes)
NamespacesMonobjc.AppKitNSString_AppKitAdditionsSizeWithAttributes(NSString, NSDictionary)

Returns the bounding box size the receiver occupies when drawn with the given attributes.

Original signature is '- (NSSize)sizeWithAttributes:(NSDictionary *)attributes'

Available in Mac OS X v10.0 and later.

Declaration Syntax
C#Visual BasicVisual C++
public static NSSize SizeWithAttributes(
	this NSString __target,
	NSDictionary attributes
<ExtensionAttribute> _
Public Shared Function SizeWithAttributes ( _
	__target As NSString, _
	attributes As NSDictionary _
) As NSSize
static NSSize SizeWithAttributes(
	NSString^ __target, 
	NSDictionary^ attributes
__target (NSString)
The target instance.
attributes (NSDictionary)
A dictionary of text attributes to be applied to the string. These are the same attributes that can be applied to an NSAttributedString object, but in the case of NSString objects, the attributes apply to the entire string, rather than ranges within the string.
Return Value
The bounding box size the receiver occupies when drawn with attributes.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type NSString. When you use instance method syntax to call this method, omit the first parameter.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc.AppKit (Module: Monobjc.AppKit)