Nevron .NET Vision
User Interface for .NET / User's Guide / Decorators / Standard Decorator

In This Topic
    Standard Decorator
    In This Topic

    Based on the generic Decorator design-pattern our Decorators are extremely useful controls enabling you not only to experience all of the predefined components that ship with the library but to create and decorate your own custom ones with ease. Modern effects like Glass, Gel, Vista are a piece of cake to produce with our decorators. And yet another unique feature is the support for shadow - either solid or linear blur. All fill, stroke and shadow information is grouped by objects so that you can customize the look-and-feel of your application using only the Windows Forms Designer.


     Fill Info

    The settings that control the filling of a NDecorator are grouped by a NFillInfo object, member of the control. As well as the default gradient filling you may specify an extended ones like Glass and Gel and even a segmented image or texture.


    The flexible model allows you to use a NFillInfo for your own rendering methods:


    Copy Code
    //create a NFillInfo object
    NFillInfo info = new NFillInfo();
    info.GradientStyle = GradientStyle.Vista;
    Brush brush = info.CreateBrush(myBounds, 0, RoundingEdges.None);
    myGraphics.FillRectangle(brush, myBounds);
    Visual Basic
    Copy Code
    'create a NFillInfo object
    Dim info As NFillInfo = New NFillInfo()
    info.GradientStyle = GradientStyle.Vista
    Dim brush As Brush = info.CreateBrush(myBounds, 0, RoundingEdges.None)
    myGraphics.FillRectangle(brush, myBounds)
     Stroke Info
    The NStrokeInfo object is the stroke analog of the NFillInfo. You may specify the type of the pen - solid or created form a brush. In most the same manner you may use the pen returned from the CreatePen method and do your own painting.
    See Also