Skip to content

Replies

0
Brian Fallon
Brian Fallon answered on Aug 14, 2008 2:49 PM

The iconic views (UltraListView.View = Icons/Tiles/Thumbnails) expose an 'Alignment' property, which indirectly determines whether a horizontal or vertical scrollbar will appear.

Example:
this.ultraListView.ViewSettingsIcons.Alignment = ItemAlignment.LeftToRight;

0
Brian Fallon
Brian Fallon answered on Mar 12, 2008 3:56 PM

The Infragistics.Win.UIElement class encapsulates an object's user interface representation. The NodeSelectableAreaUIElement class derives from Infragistics.Win.UIElement; it represents the area of the node which when clicked will cause the node to become selected. This area includes the image and text, but not the expansion indicator.

The UltraTreeNode class exposes a UIElement property, which returns an object of type TreeNodeUIElement. This element represents the node's physical representation in the user interface. The UIElement class exposes a Rect property, which returns the bounds for the element, expressed in client coordinates. Note that the UltraTreeNode's UIElement property can under normal circumstances return null, which it does when the node is not in the viewable area of the control. When it returns a non-null value, you can convert the Location component of the Rect property to screen coordinates to determine the screen location of the node.

0
Brian Fallon
Brian Fallon answered on Mar 11, 2008 2:30 PM

/// <summary>
/// Handles the UltraTree's MouseDown event.
/// </summary>
private void UltraTree_MouseDown( object sender, MouseEventArgs e )
{
    if ( e.Button == MouseButtons.Right )
    {
        UltraTree tree = sender as UltraTree;
        UIElement controlElement = tree != null ? tree.UIElement : null;
        UIElement elementAtPoint = controlElement != null ? controlElement.ElementFromPoint( e.Location ) : null;
        NodeSelectableAreaUIElement nodeElement = null;

        while ( elementAtPoint != null )
        {
            nodeElement = elementAtPoint as NodeSelectableAreaUIElement;
            if ( nodeElement != null )
                break;

            elementAtPoint = elementAtPoint.Parent;
        }

        if ( nodeElement != null )
        {
            //  If you get in here, the right mouse button
            //  was pressed on the node's selectable area, which does
            //  not include the expansion indicator.
        }
    }
}