Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Products › Development › Forge › Component - WebControls Register  |  

 

dnn_ct_webcontrols_170x64.gif

 

  Quick Links  
 


  Team Leadership  

Jon Henning

jonhenning.jpg

 


  DotNetNuke Projects  
The DotNetNuke Projects are a special category of platform extensions which are developed by volunteers to conform to the high professional standards mandated by DotNetNuke Corporation. The DotNetNuke Projects are distributed as a standard part of the DotNetNuke core application release offerings.

 


The best choice for your web site host, email hosting, and domain registration.
  Ads  
Engage Software - Training Partner for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
The Official Microsoft ASP.NET Website
 


DotNetNuke® Project :: WebControls

The primary purpose of the DotNetNuke WebControls project is to allow developers to utilize feature-rich controls in their applications without the associated cost or distribution restrictions associated with commercial controls. All controls utilize the ClientAPI, and therefore support a rich client side object model, work cross-browser, and utilize AJAX functionality.

The DotNetNuke TreeView control is an open-source ASP.NET WebControl that has a rich client-side object model and supports advanced featuresets like populate on demand and keyboard navigation.
The DotNetNuke Menu control is an open-source ASP.NET WebControl that has a rich client-side object model and supports advanced featuresets like populate on demand and keyboard navigation (soon).
The DotNetNuke Label Edit control is an open-source ASP.NET WebControl that allows any label to be editable on the client where it uses a client-callback to persist the changes. Simply specify a client-side event like onclick to allow the user to edit. It supports RichText and MultiLine editing.
The DotNetNuke Text Suggest control is an open-source ASP.NET WebControl that allows any textbox to suggest the results the user is looking for by dynamically populating a menu of matched items.
The DotNetNuke Tab Strip control is an open-source ASP.NET WebControl that allows a page to be displayed in a tabular manner. It supports 3 rendering modes, including AJAX on-demand loading to allow for optimal performance.
The DotNetNuke ToolBar control is an open-source ASP.NET WebControl that allows a toolbar to be attached to any control.
 


WebControls Project Blog
Oct 5

Posted by: Jon Henning
10/5/2007

Ever since version 1.0 of the Solpart menu, it supported animations.  Unfortunately, these animations were specific to IE due to it being the only browser that supported transitions natively.  When I created the DNNMenu I had decided not to go this route, but rather seek out a technique that worked across all browsers.  When I was first reviewing the Atlas bits, there was a portion called Glitz, which I had anticipated would support the animations I was looking for.  Unfortunately, Glitz never became an official part of the framework.  This caused me to research how animations are written that look smooth.  I stumbled upon the concept of Tweens, which eventually led me to Robert Penner's free tweening chapter.  In reviewing it I had decided to try my hand at implementing something similar inside the ClientAPI.  This led to the creation of the dnn.motion namespace.  To demonstrate its functionality have a look at the new webcontrols site.

Notice how the icons in the header of the page gracefully fall and bounce into position.  This effect is possible thanks to the mathematical formula specified by Mr. Penner.  All a developer has to do to implement it is first register the motion namespace from the server

If ClientAPI.BrowserSupportsFunctionality(ClientAPI.ClientFunctionality.Motion) Then
  ClientAPI.RegisterClientReference(Page, ClientAPI.ClientNamespaceReferences.dnn_motion)
End If

Then on the client simply tell the animations how to behave with the following code

dnn.dom.doTween(id, ctl, 'top', dnn.easing.easeOutBounce, -100, 50, 1);
Parameter Description
id ID to uniquely identify animation.  Useful if you wish to stop or replay the animation
ctl Control to animate
property Property to modify for animation  Valid values are any style name (top, height, etc.) plus cliptop, clipbottom, clipleft, clipright
easeFunc Easing equation to use (linearTween, ease[In/Out/InOut]Quad, ease[In/Out/InOut]Cubic, ease[In/Out/InOut]Quart, ease[In/Out/InOut]Quint, ease[In/Out/InOut]Sine, ease[In/Out/InOut]Expo, ease[In/Out/InOut]Circ, ease[In/Out/InOut]Bounce) - if these seem overwhelming, read the chapter.
begin starting value for the property (in our sample we start at top=-100
finish finishing value for the property (stop at top=50)
duration number of seconds to run the tween
interval (optional) how often animation gets updated (milliseconds).  The lower the number the more smooth but also the more demanding on the CPU (default=10)
suffix (optional) suffix to append to value (px for example)
onStartFunc (optional) function to invoke prior to animation
onFinishFunc (optional) function to invoke after animation

Another example of the use of animations can be found in the animations sample page.  This sample utilizes the same doTween implementation for the mouse over and out events.  However, when the icon is clicked, it uses a "canned" animation technique to give the appearance of the box sliding out underneath the icon.  This effect is done by combining multiple tweens together.  To invoke these techniques the element being animated must have its positioning specified as absolute. 

dnn.dom.animate(m_Description, dnn.motion.animationType.Slide, 'right', 1, 1, 
	dnn.motion.easingType.Expo, dnn.motion.easingDir.easeInOut);
Parameter Description
ctl Control to animate
type [dnn.motion.animationType enumerator] Ttype of animation (Slide, Expand, Diagonal, ReverseDiagonal)
dir [dnn.motion.animationDir enumerator] direction (up, down, left, right)
easingType [dnn.motion.easingType enumerator] Type of equation to use (Bounce, Circ, Cubic, Expo, Quad, Quint, Quart, Sine)
easingDir [dnn.motion.easingDir enumerator] Direction of animation (easeIn, easeOut, easeInOut)
duration  number of seconds to run the animation
interval (optional) how often animation gets updated (milliseconds).  The lower the number the more smooth but also the more demanding on the CPU (default=10)
onStartFunc (optional) function to invoke prior to animation
onFinishFunc (optional) function to invoke after animation

The animate function is utilized by the new DNNMenu and eventually other webcontrols.  The menu on the WebControls sample site currently uses the Slide technique to show and hide the sub-menus.  To apply custom settings when using the control directly, the following markup is used.

You can play with the different settings allowed for the menu animations on this sample page.

In case you are wondering how animations can be applied to the navigation controls within DNN, the current plan is for the Nav skin object to allow access to the these properties through the CustomAttributes collection.

<CustomAttributes>
  <dnn:CustomAttribute Name="AnimationType" Value="Slide"/>
  <dnn:CustomAttribute Name="EasingType"Value="Bounce"/>
  <dnn:CustomAttribute Name="EasingDirection"Value="Out"/>
  <dnn:CustomAttribute Name="AnimationLength"Value="1"/>
  <dnn:CustomAttribute Name="AnimationInterval"Value="10"/>
  <dnn:CustomAttribute Name="RenderMode"Value="Normal"/>
CustomAttributes>

That's enough information for this blog.  I will be covering this topic briefly, along with a whole lot more of the new features available to the module developer in my session at OpenForce '07.. 

 

Animation-AnimationType="Slide" Animation-EasingDirection="Out" Animation-EasingType="Expo"

Tags:

Re: We Be 'Tweening

Great looking stuff!

I have been using other libraries like Prototype and add-ons like script.aculo.us to achieve the similar effects. It occurs to me that there would be a bunch of duplication between all these libraries and it would be good to homogenize my efforts. The community around these libraries can be large and provide many great resources. For example, most of what A List Apart writes is in Prototype.

Have you, or anyone else, researched on how we could harness scripts written in Prototype? Are there simular functions like $$ in the DNN libraries?

By lancelong on   10/5/2007

Re: We Be 'Tweening

99% of the ClientAPI should work fine with any other script library. The one trap I fell into was implementing the $ function (like MS did originally).

There is definitely duplication between libraries. This release of the ClientAPI was focused on moving towards merging with MS AJAX implementation. A few of my base methods now simply pass through to the MS implementation.

By jhenning@solpart.com on   10/5/2007

Re: We Be 'Tweening

Ploum,
The code is not released yet. If you click the Download from the new sample site, it should take you to the WebConrols download page, which has an alpha version available for a select group of people.

At some point in the near future I will be expanding this group, to get a broader test range. Look for a blog on this soon.

By jhenning@solpart.com on   10/8/2007

Re: We Be 'Tweening

MathisJay,
I was vaguely familiar with jQuery, but didn't know they had a plugin for easing equations. In essence, the new dnn.motion namespace is like a plugin for the ClientAPI.

The little that I have reviewed jQuery, especially when it comes to the chainable methods, gives me the same impression as I have with Regular Expressions. There is a lot of power there, but it comes at the cost of readability.

Thanks for the comments. If your going to Vegas, make sure you find me and we can talk some more.

By jhenning@solpart.com on   10/9/2007

Re: We Be 'Tweening

Hi Jon,
It's realy nice! I have one question, on the new web site demo the version is v2.0, but when I click on donwload SourceForge propose only the version 1.5.3? Am I wrong?
Gilles

By Ploum on   10/8/2007

Re: We Be 'Tweening

Hi Jon
Are you familiar with jQuery? There seems to be alot in the jQuery lib that could really benfit your projects. They already have a lot as far as animations, easing, menus, etc. I would interested to hear your thoughts.

By mathisjay on   10/9/2007

Re: We Be 'Tweening

There is no central repository that I know of. My goal for the ClientAPI/WebControls was to provide a framework for skin developers, skin object developers, and module developers to write on top of. I do think, however, that a central repository specific to add-on/widgets/modules/etc. is a good idea.

By jhenning@solpart.com on   10/10/2007

Re: We Be 'Tweening

Thanks for the response. I am still trying to learn about jQuery myself, so I appreciate your feedback. The chaining thing - I think - is just a convienance to allow you to reduce the overall lines of code. You can still separate each command out to its own line if you like.

The things the impresses me most about jQuery is how easy it is to do stuff and how many plug-ins have been made for it. And the documentation for it is pretty top-notch.

In fact, when I first looked at it, I had a thought that it might even be possible to use it as the default ClientAPI for DNN just based on how flexible it is and how many plug-ins are already available for it.

Don't mean to step your toes of course, I always appreciate what you do for DNN. But after all, you are only one guy and this project seems to have a whole lot of people behind it contributing to it just like DNN.

Anyways, if you have some time - yeah right - take a deeper look and tell me if you think there's room for both in DNN or how they might be intergated.

By mathisjay on   10/9/2007

Re: We Be 'Tweening

Follow up to Prototype comment... is there a repository for add-ons built on the DNN libraries? If tools like Shadow Box could be re written to use the DNN code then it would save bandwidth. It would be nice for many reasons if module developers reused these scripts too.

By lancelong on   10/10/2007

Re: We Be 'Tweening

Perhaps as community driven section of http://webcontrols.dotnetnuke.com where we can also post tutorials on how to integrate the widgets properly? ;)

I won't make it to Vegas this time or I would chat more with you about this.

By lancelong on   10/11/2007
 


DotNetNuke Modules, Skins, Training and Consulting
If you want DotNetNuke done right then look no further. Developed Solutions provides module development, skin design, user and developer training and consulting. Based in Adelaide, Australia, we offer our services worldwide.
www.developedsolutions.com.au
Venexus, Inc.
Need custom a custom DotNetNuke module? From module planning to deployment, including training and support, Venexus developers deliver end-to-end web solutions on time and on budget.
www.venexus.com
Bring2mind
Document Centric DNN Module Solutions
www.bring2mind.net

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP