Showing posts with label html. Show all posts
Showing posts with label html. Show all posts

Thursday, September 23, 2010

C# WPF Grid System

There are multiple "root" elements that you can use when designing a WPF application.

I want to talk about the "Grid" element.

This is pretty useful when you have a 'template' layout.  When you know where UI elements are going to be, and/or you are sure that your screen will be resized, you can use the 'Grid' element as your root.

The Grid element is very similar to the Table element in HTML.

A specific question I came across, was "Can I make one row a fixed size, while the other rows grow as the user changes the size of the form?".  This was an issue, because as the user changes the size of the form, the Grid cells, grow and shrink with the form.

Yes, you can set a specific row's height or a column's width.

There are 3 different ways you can set the height of a row.

row.Height = new GridLength(...

The three choices are:

    Pixel - fixed.  The value entered will be the amount of pixels exactly.
    Auto - this will make the row the size needed by the content.
    Star - takes as much as needed, or the amount in percent.

Just thought this was interesting.

Wednesday, August 18, 2010

HTML 5 Canvas

I wanted to put some HTML 5 Canvas stuff down.

Since HTML 5 is not finalized, some of this stuff might change.

There are a few gotchas that you will need to look out for.

HTML 5 is NOT XHTML.  This means that XHTML standards don't apply.  Attributes do not need quotation marks around values.  Element tags do not need to be closed.  These things are good ideas, but you do not need them.


CANVAS.  Man.  So, if you want to [STYLE] a canvas, there are some things you need to look out for.
To set the "WIDTH" and "HEIGHT" you need to set the "WIDTH" and "HEIGHT" attribute, not the "STYLE".  For instance, instead of style="width:20px; height: 20px;", you set attributes in the tag; like [ width="20" height="20" ].

Tuesday, August 17, 2010

Javascript Charts

This site is full of javascript chart websites.

http://www.articlediary.com/article/25-graph-chart-solutions-for-web-developers-277.html

Don't know if all are good, but www.highcharts.com is awesome.

Tuesday, May 11, 2010

Z-index

There is a CSS property z-index, which lets the developer set the 'stack order' of elements on an HTML page.

Z-index only works with 'positioned' elements, for instance: position: absolute;

Z-index, also, has the greatest number in front of the lowest number.

Thursday, April 15, 2010

One-click download for text file on HTML

To create a one-click download link on a webpage, for a text file that is basically a 'csv' or comma separated values file, put the '*.csv' extension.


Monday, February 15, 2010

HTML Horizontal Scroll

There is a simple way to make a 'div' horizontally scrollable.

Use css and have that div's class property:

.myDivsClass
{
overflow: auto;
}

Tuesday, January 5, 2010

IE Img tag

I.E. doesn't like [input type="image"] inside a link.

It will just loop back to the parent page.

Use ]img] tag.

Monday, January 4, 2010

HTML Symbols

Here's a cool website for HTML symbols.

http://www.webdesignerwall.com/tutorials/using-html-symbol-entities/

Thursday, June 11, 2009

Show Loading gif on button click

I wanted to show a loading gif on a user button click, because the action would take a while. So this is the solution I found.



You make the div style.display = "none;" then on button click, you set the style.display = "";

Tuesday, June 2, 2009

ListBox in Html

List boxes in HTML are called 'select'. Each value is called 'option'. These 'select' and 'option' are tags with '<' and '>', but Blogger won't let you writing these explicitely.

A dropdownlist will be displayed unless you add ' size="###" ' as an attribute, where ### is greater than 1.