See Also

UIElement Class  | UIElement Members

Language

Visual Basic

C#

Show All

See Also Languages Infragistics2.Win.v7.2

ControlElement Property

Infragistics.Win Namespace > UIElement Class : ControlElement Property (UIElement)

Returns the top level/control element. Read-only.

[Visual Basic]
Public ReadOnly Property ControlElement As ControlUIElementBase
[C#]
public ControlUIElementBase ControlElement {get;}

Example

This sample demonstrates BorderStyle in use with the ControlElement and IsFlatModeProperty. If the ControlElement is in flat mode, we draw a simple solid border, otherwise we draw raised.

[Visual Basic] 

    Imports Infragistics.Win

    Public Overrides Property BorderStyle() As UIElementBorderStyle

        Get

                    ' Returns borderstyle based on FlatMode property of the control.
            If Me.ControlElement.UltraControl.IsFlatMode Then
                Return UIElementBorderStyle.Solid
            Else
                Return UIElementBorderStyle.Raised
            End If

        End Get

        Set(ByVal Value As UIElementBorderStyle)

            MyBase.BorderStyle = Value

        End Set

    End Property

[C#] 

        using Infragistics.Win; 
 
        public override UIElementBorderStyle BorderStyle 
        { 
 
            get 
            { 
 
                // Return borderstyle based on FlatMode property of the control. 
 
                if (this.ControlElement.UltraControl.IsFlatMode) 
                    return UIElementBorderStyle.Solid; 
                else 
                    return UIElementBorderStyle.Raised; 
 
            } 
 
        }

See Also

UIElement Class  | UIElement Members

E-mail your feedback on this topic.

Opinion about our help? Take our survey.

Copyright © 1996-2007 Infragistics, Inc. All rights reserved.

Build Version: 7.2.20072.1063