.NET Tutorials, Forums, Interview Questions And Answers
HomeTutorialArticlesForumInterview QuestionCode SnippetsTechnology NewsFun Zone Poll Certification Search
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Home >> Code Snippets >> Visual Studio >> Post New Resource Bookmark and Share

 Subscribe to Code Snippets

Infragistics - WINLABEL CONTROL

Posted By :Deepika Haridas      Posted Date :01/02/2010   Points :10   Category: Visual Studio    URL: http://www.angeldeeps.blogspot.com

The WinLabelT 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:
    


Infragistics - WINLABEL CONTROL


The WinLabelT 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



Featured Articles


Design Pattern Interview Questions Part (3)
Software Architecture Interview Questions Part 3 State Pattern, Stratergy pattern,Visitor pattern, Adapter and fly weight ... Read More
Software Architecture Interview Questions Part 4- Design Patterns
(A) Can you explain bridge pattern? (A) Can you explain composite pattern? (I) Can you explain decorator pattern ? (A) Can you explain Façade pattern? (A) Can you explain chain of responsibility ( COR)? (I) Can you explain proxy pattern? (B) Can you explain template pattern? ... Read More
UML Interview Question Part 1
(B) Define UML? (I) Can you explain use case diagrams? (I) Can you explain primary and secondary actors? (I) How does a simple use case look like? (I) Can you explain 'Extend' and 'Include' in use cases? (I) Can you explain class diagrams? (B) How do we represent private, public and protected in class diagrams? (I) what does associations in a class diagram mean? (I) Can you explain aggregation and composition in class diagrams? (A) What are composite structure diagram and reflexive association in class diagrams? ... Read More
Responses
No response found. Be the first to respond this post
Post Comment
You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend