Well, as part of our lastest project, I needed to figure a way how to spin a widget.
So, how do you rotate widgets in an Asp.Net application? Well that question is fairly simple to answer - Silverlight!
The next question is much harder: Buy or Build?
After some searches I found two controls for sale: The Telerik Cube control and the ComponentOne C1Cube control.
So, first stop, download each and put them through the paces. I found a deal breaker for each control.
We need to be able to minimize our widgets but both controls had problems with that:
- The Telerik control would resize but would apply a transform to 'Squash' the widget and according to the Telerik website FAQ, this behaviour can not be overridden.
- The Component one control 'Must' be in the shape of a cube. Ok, I know that sounds like a 'duh' point, but like I said, we need to minimize our widgets. But when I altered the height of the control to just the height of the header, the cubes' width was also adjusted.
So, that left build - but there did not seem to be any examples of how to rotate a cube from side to side, on demand. I did find an example of a continuously spinning cube. With this example to decompose, I slowly taught myself the parameters and transformations that were needed to create the appearance of a cube spinning from one face to another.
So, here is my demo of a rotating six sided cube. If you do not need to rotate to the top and the bottom, you can have sides of any height, as long as all the sides are of the same height. Plus, my example is not limited to four or six sides. This example allows for an unlimited number of sides!
Now, there a couple of things that the professional controls do that my demo cannot. My code cannot free rotate and it also does not twist as it rotates to properly show a side. If you need these properties, you may want to go with the professional controls.
Here is the Visual Studio 2008/Silverlight 3 project.
Monday, November 30, 2009
Thursday, November 12, 2009
Personal Site Launched!
Well, it has taken awhile but I've finally rolled out a personal website. LeeSaunders.net is a place that I can post about all things that interest me ... except dot net programming, of course!
There is not much content as of yet, but the reason I am posting about it here is that I've used the asp.net web template that I created in a previous post. So if you want to see a live site, not just a live example, then head out to LeeSaunders.net!
There is not much content as of yet, but the reason I am posting about it here is that I've used the asp.net web template that I created in a previous post. So if you want to see a live site, not just a live example, then head out to LeeSaunders.net!
Thursday, October 22, 2009
My first free ASP.Net CSS web template
Note: I've added a label: "Free Template" for all my posts relating to converting free CSS XHML web templates to Asp.Net web projects.
While watching TV for a couple evenings, I converted a simple CSS XHTML web template into a Asp.Net 2.0 project.
The template I converted I found on ThemeBot.com. I like ThemeBot.com because most of the web templates are covered by the Creative Commons license. The license gives you two explicit rights: you are free to share the template and you are free to adapt the template. The license(s) have either one condition: you must attribute the template, in the manner as specified by the author or two: attibute and Share Alike, where if you share your creation, you must also use this license (Or a similar one).
The template I altered was this one: sparkBB014. It is a simple template for a blog. Here is the link to the sparkBB014 Demo.
Now with all the prelimaries out of the way, here is what I did:
I wanted to achive a couple of things:
1 - Use a MasterPage
2 - Wrap the reusable/optional elements in UserControls
3 - Move all the data to the code behind so that users can easily be made dynamic.
So, I created a web project and added a master page to the project. Next I copied all the markup from between the body tags and copied it into the master page.
Then I pulled out each block of data and the surrounding markup out and replaced it with a ContentPlaceHolder. Then inside the Default.aspx for each ContentPlaceHolder I placed a corresponding Content tag and filled it with the data/markup I had just removed from the Master Page.
Once that was done, I started IDing and runat=servering html elements so that I could touch them programatically.
Seeing that the entire blog design scheme was repeated for each entry, I pulled the entire structure out into into own ascx UserControl.
And since I would not want the search area on every page I moved it as well to its own ascx UserControl.
Last but not least, I removed the actual data from the markup and coded the codebehind c# to dynamically load the data into the markup. So, here is the zip file containing the project and here is a link to the asp.net site hosted at 1&1. Please, tell me what you think!
While watching TV for a couple evenings, I converted a simple CSS XHTML web template into a Asp.Net 2.0 project.
The template I converted I found on ThemeBot.com. I like ThemeBot.com because most of the web templates are covered by the Creative Commons license. The license gives you two explicit rights: you are free to share the template and you are free to adapt the template. The license(s) have either one condition: you must attribute the template, in the manner as specified by the author or two: attibute and Share Alike, where if you share your creation, you must also use this license (Or a similar one).
The template I altered was this one: sparkBB014. It is a simple template for a blog. Here is the link to the sparkBB014 Demo.
Now with all the prelimaries out of the way, here is what I did:
I wanted to achive a couple of things:
1 - Use a MasterPage
2 - Wrap the reusable/optional elements in UserControls
3 - Move all the data to the code behind so that users can easily be made dynamic.
So, I created a web project and added a master page to the project. Next I copied all the markup from between the body tags and copied it into the master page.
Then I pulled out each block of data and the surrounding markup out and replaced it with a ContentPlaceHolder. Then inside the Default.aspx for each ContentPlaceHolder I placed a corresponding Content tag and filled it with the data/markup I had just removed from the Master Page.
Once that was done, I started IDing and runat=servering html elements so that I could touch them programatically.
Seeing that the entire blog design scheme was repeated for each entry, I pulled the entire structure out into into own ascx UserControl.
And since I would not want the search area on every page I moved it as well to its own ascx UserControl.
Last but not least, I removed the actual data from the markup and coded the codebehind c# to dynamically load the data into the markup. So, here is the zip file containing the project and here is a link to the asp.net site hosted at 1&1. Please, tell me what you think!
Subscribe to:
Posts (Atom)