Dec 28, 2009

Infragistics - WINLABEL

Infragistics - WINLABEL CONTROL


The WinLabel™ control is a basic label type control. Much of the included functionality in the intrinsic label (autosize, mnemonics, image and text) is provided as well as some additional functionality, including:
1. Appearance support -- Full Appearance support including alphablending, gradients, etc.
2. HotTracking -- Alter the appearance of the label when the mouse is over the element.
3. BorderStyleInner/BorderStyleOuter -- The two borderstyles can be used to create additional border effects - "bump" border, etc. The InnerBorderPadding controls the space allocated between the inner and outer border.
4. ImageSize -- Control the size of the image displayed in the label.
5. WrapText -- Determines whether text will wrap when the element is not wide enough to display the entire text.

Infragistics - WINLABEL

Infragistics - WINLABEL






EXAMPLE (FONT)

using Infragistics.Win;

private void SetGridFont()
{
  FontData fd= this.ultraGrid1.DisplayLayout.Appearance.FontData;
  fd.Bold = DefaultableBoolean.True ;
  fd.Italic = DefaultableBoolean.True;
  fd.Name = "Times New Roman";
  fd.Underline = DefaultableBoolean.True;
}

EXAMPLE (TEXT)
 
public override string Text {get; set;}


EXAMPLE (AUTO HIDE)

using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.Misc;

private void CreateShapeImage(Infragistics.Win.Misc.UltraButton button)
{
    // create a bitmap that will be used to provide the shape
    // of the button.
    Bitmap bitmap = new Bitmap(100,100);

    // create a temporary graphics object so we can render into it
    using (Graphics g = Graphics.FromImage(bitmap))
    {
       // draw the background in white. whatever color is in the lower left hand pixel will be assumed to be transparent
       g.Clear( Color.White );
       // draw our circle in a different color
       g.DrawEllipse( Pens.Black , 0, 0, 99, 99 );
       // make sure to fill it in or the only displayed part of the button will be the outline of the circle
       g.FillEllipse( Brushes.Black, 0, 0, 99, 99 );
    }

    // set the shape
    button.ShapeImage = bitmap;

    // autosize to the shape image
    button.AutoSize = true;
}


More resources related to Infragistics:

Nested tables in Ultragrid

WinToolTipManager



No comments:

Post a Comment