Applying CSS on mobile controls

ASP.NET

    Sponsored Links

    Next

  • 1. Server-side image creation in ASP.NET Mobile Web Application
    Hi, I have to generate an image based on information saved in a DB. This image needs to contain the draw of a cinema room places. This work has the objective to implement a Online cinema ticket reservation. I try this: Bitmap bitmap = new Bitmap(10,10); System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(bitmap); g.DrawLine(new Pen(Color.BurlyWood), 0, 0, 10, 10); bitmap.Save("image1.png", System.Drawing.Imaging.ImageFormat.Png); Image1.ImageUrl = Server.MapPath(Session.SessionID + ".png"); But the Save method is not available in .NETCF, and I don't know if this is the best way to force an image to be visible on the client-side. Any help to turn around this problem? Thanx a lot, Ricardo Veloso
  • 2. Does any non-mobile-phone wireless device support Openwave browser?
    Hi all, I understand that there are a range wide of mobile / cellular phones using Openwave browser. How about non-phone devices such as PDAs, 2-way pagers, etc? As far as I know, ALL smartphones and Pocket PCs use Pocket Internet Explorer. Is that true? Thanks Dom
  • 3. Serial Port Example
    I am trying to find a complete Embedded C++ example that will allow me to open a serial port (COM1) on a winCE 4.2 device. Can any one Help? Thank you. A.
  • 4. Objectlist detailswindow
    Hi, For my ASP.NET mobile application I have an objectlist on my form which is populated by a dataset. When I run it, I can tap on one of the row items and I get a nice details view (created by the control). Is it possible to add a link to that details window? The list shows some possible downloads and I would like it to be possible that the user first taps on it, then get the details view and he can tap on a link or button to download it. Is this possible and if yes, how? rg, Eric
  • 5. Recommended Device for Learning to Program
    What is a recommeded model of pocket PC or phone to get started with software developmenet for mobile devices? Thanks, Siegfried

Applying CSS on mobile controls

Postby a2V5dXI0NzgzMQ » Thu, 26 Jul 2007 23:42:04 GMT

i am facing trouble in applying stylesheets on mobile controls. I want to 
give background color to a label but its not rendering. Can any one please 
help me..??

Re: Applying CSS on mobile controls

Postby arnie » Wed, 15 Aug 2007 17:56:20 GMT

Hi
You can make use of mobile web user control to create a style sheet
like this
1. Add a new mobile web user control to the project.
2. Add code to the file like this



<mobile:StyleSheet ID="StyleSheet1" Runat="server" >
<mobile:Style Name="style1" Font-Name="Verdana" BackColor="#0099cc"
Font-Size="normal" Font-Bold="true" ></mobile:Style>
<mobile:Style Name="Button"></mobile:Style>
</mobile:StyleSheet>
3.Save it.
4. In the mobile web form where you want to apply this style sheet add
this
<mobile:StyleSheet ID="StyleSheet1" Runat="server" ReferencePath="css
\StyleSheet.ascx"></mobile:StyleSheet>

In each mobile control there is a propery called StyleReference where
you can specify one of the style names present in the external style
sheet created above

Hope this helps
Arnie


Similar Threads:

1.apply CSS on literal control?

Hello

I use Microsoft Office Webcomponents to create a pivottable and display the
output as HTML on a literal control.

I need to apply a CSS to this literal control, because the HTML data is
already formatted by the OWC pivottable object...

(simplified) code:

MyLiteralcontrol.text = MyOWCPivottable.HTMLData

The pivottable displays, but doesn't look the way I like it (font, borders
etc)

Any suggestions on how to do this?

Thanks,

Joost


2.Applying CSS to HTML Control Programatically

I am using HTML controls in my page i want to Programatically apply CSS for
that controls as that of contorol.CSS="cssname" for Web Control. How to do
it?.

Thanks in Advance
Prakash.V


3.how to apply css class style to web controls

i am using web control in my project .how to apply css style to the web control

4.applying css formats to asp.net 2.0 treeview control

Hi all,

I'm trying to create a nice navigation for an asp.net 2.0 website.
What I want to do is use css to define the look of the tree. My
problem is that I cannot set margins or paddings via css. I want to
create a gap between top-level nodes, however not between a top-level
node and its first child (which I set always visible). I defined css
classes like "navi_level0", "navi_level1", ... in my css file and set
the CssClass properties in the corresponding TreeNode's LevelStyles.
Applying colors, font-sizes etc. works fine, but since the TreeView
control does only render my previously defined css classes to the <td>
elements and not to any enclosing <div> or <table> tags, I remain
helpless with css since I can define margin only for <table> and <div>
tags.
My next approach was using the VerticalPadding, NodeSpacing and Height
properties of the corresponding LevelStyle. But here, the value is
applied both at the top and at the bottom of the element, rendering a
gap above AND below each top-level node. Is there any workaround or is
this control not css formattable?
Would it be possible to create a custom class derived from the
TreeView class?
Thanks in advance.

Cheers, Hannes.

5.Applying new style for mobile control

Hi,

I'm trying create new style property for mobile panel control and getting 
following error:
Specified cast is not valid
Line 21: 			set
Line 22: 			{
Line 23: 				this[DirectionKey] = value;
Line 24: 			}

Here is my code(just like in msdn site)
public class StyleWithRtl : Style
	{
		public static String DirectionKey = 
		RegisterStyle("Direction", typeof(String), string.Empty, true).ToString();

		
		public String Direction
		{
			get
			{
				return (String)this[DirectionKey];
			}
			set
			{
				this[DirectionKey] = value;
			}
		}


	}

Any help?
thanks,
Eugene

6. LinkButton in GridView TemplateField not applying a:visited css st

7. applying CSS using Custom Attributes

8. Applying CSS for gridview template column



Return to ASP.NET

 

Who is online

Users browsing this forum: No registered users and 24 guest