Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
op_Equality Method

DrawingAttributes.op_Equality Method

Determines whether the specified DrawingAttributes objects are equal.

Namespace: System.Windows.Ink
Assembly: PresentationCore (in presentationcore.dll)

public static bool operator == (
	DrawingAttributes first,
	DrawingAttributes second
)
You cannot use methods in XAML.

Parameters

first

The first DrawingAttributes object to compare.

second

The second DrawingAttributes object to compare.

Return Value

true if the objects are equal; otherwise, false.

Two DrawingAttributes objects are equal if the following properties are equal:

NoteNote:

The Equals method does not check the custom properties for equality.

The following example compares two DrawingAttributes objects for equality. Because the Color, StylusTip, Height, and Width properties on attributes1 and attributes2 are set to the same values, the "The DrawingAttributes are equal" message appears.

        DrawingAttributes attributes1 = new DrawingAttributes();
        attributes1.Color = Colors.Blue;
        attributes1.StylusTip = StylusTip.Rectangle;
        attributes1.Height = 5;
        attributes1.Width = 5;

        DrawingAttributes attributes2 = new DrawingAttributes();
        attributes2.Color = Colors.Blue;
        attributes2.StylusTip = StylusTip.Rectangle;
        attributes2.Height = 5;
        attributes2.Width = 5;

...

        if (attributes1 == attributes2)
        {
            MessageBox.Show("The DrawingAttributes are equal");
        }
        else
        {
            MessageBox.Show("The DrawingAttributes are not equal");
        }

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2015 Microsoft