Search KB Filter article types
Custom Controls - Custom Panel with Opacity
Categories: Panels, Skinnable and Inherited Controls
Tags: Developers, HTML, XSLT, 2. Intermediate, 3. Advanced, Customization, v6.4 and Later
Revision: 1
Posted: 10/April/2010
Updated: 23/July/2010
Status: Publish
Types: Code

This article will have a few sections added to it soon, based on the following article type skeleton: CodeSample
This article is being worked on by Gizmox.

Overview

This is an implementation of a Custom Panel control, OpacityPanel, as a Visual WebGui 6.4 Custom Control that has adjustable Opacity (transparency) setting. The control also has adjustable setting for if you want to apply the Opacity on child controls or not.

To use simply add the OpacityPanel Panel control on a Form and adjust the Opacity and OpacityOnChildren properties to your liking.

The attached demo application has code for C# and VB.NET in VS2005 and VS2008. The application is written for Visual WebGui version 6.4.0Beta2 and does not work for earlier versions.

Samples of useVB.NET Code
Public Property Opacity() As OpacityValue
    Get
        Return mobjOpacity
    End Get
    Set(ByVal value As OpacityValue)
        mobjOpacity = value
    End Set
End Property

C# Code
public  OpacityValue Opacity
{
    get
    {
        return mobjOpacity;
    }
    set
    {
        mobjOpacity = value;
    }
}

The demo application

Opacity Panel Control Demo application

Tips and Tricks

Two extra public properties are defined on the custom OpacityPanel control. The use of the Opacity property deserves special attention, as it is declared as an OpacityValue type, which is an internal type of Visual WebGui. This type of usage is a great helper when it comes to the XSLT, as the value returned within the XSLT will actually be a browser dependent style setting for Opacity (the syntax is different betwen IE and FF for instance), so we do not need any browser type specific resources when using this method.

SDK Version highlights

The demo application is written against Visual WebGui version 6.4.0Beta2 and will not work on a pre 6.4 versions.

About the author

Related Articles

Panels  
Title Update Author
Tags: Developers, Navigation, 2. Intermediate, 3. Advanced, Layouting, Navigation, Pre v6.3, v6.3, v6.4 and Later
08/Jan/2009    2009/01/08
Tags: Architects, Developers, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
04/Dec/2010    2010/12/04
Tags: Architects, Developers, 1. Beginner, 2. Intermediate, 3. Advanced, Layouting, Pre v6.3, v6.3, v6.4 and Later
04/Dec/2010    2010/12/04
Tags: Architects, Developers, Navigation, 1. Beginner, 2. Intermediate, 3. Advanced, Layouting, Pre v6.3, v6.3, v6.4 and Later
21/July/2010    2010/07/21
Tags: Architects, Developers, 1. Beginner, 2. Intermediate, 3. Advanced, Layouting, Pre v6.3, v6.3, v6.4 and Later
04/Dec/2010    2010/12/04
Tags: Architects, Developers, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
04/Dec/2010    2010/12/04
.NET HTML5 Web, Cloud and Mobile application delivery | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2012 Visual WebGui®       Visual WebGui weblog on ASP.NET Gizmox Blog Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS