Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Styling WPF with CSS
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  21 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Colin Eberhardt  
View profile  
 More options Mar 11 2009, 1:19 pm
From: Colin Eberhardt <colin.eberha...@gmail.com>
Date: Wed, 11 Mar 2009 10:19:59 -0700 (PDT)
Local: Wed, Mar 11 2009 1:19 pm
Subject: Styling WPF with CSS
Hi All,

I had a crazy idea a few months back about using CSS selectors to
style WPF applications. I finally had the time to put something
together ...

http://www.scottlogic.co.uk/blog/wpf/2009/03/using-css-selectors-for-...

I would be interested to know what you guys think. Should I file this
under; "nice idea, has potential", or "crazy idea, what on earth were
you thinking?".

I do think this could have more potential within silverlight. Flex
already allows you to apply styling to your UI using CSS. Not sure how
they map between HTML elements and Flex UI widgets. I also doubt it
uses selectors, which is the main driving force for my idea.

Regards,
Colin E.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marlon Grech  
View profile  
 More options Mar 11 2009, 1:56 pm
From: Marlon Grech <marlongr...@gmail.com>
Date: Wed, 11 Mar 2009 18:56:19 +0100
Local: Wed, Mar 11 2009 1:56 pm
Subject: Re: [WPF Disciples] Styling WPF with CSS

any thing that has to do with selectors is a good idea :P I love selectors
they can be used for so much.... for example look at JQuery.... I like your
idea and I think it makes a lot of sense....

Regards
Marlon
WPF Blog - http://marlongrech.wordpress.com/

On Wed, Mar 11, 2009 at 6:19 PM, Colin Eberhardt
<colin.eberha...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Anson  
View profile  
 More options Mar 11 2009, 1:56 pm
From: David Anson <david...@microsoft.com>
Date: Wed, 11 Mar 2009 10:56:50 -0700
Local: Wed, Mar 11 2009 1:56 pm
Subject: RE: [WPF Disciples] Styling WPF with CSS
*I* think it's interesting, Colin. :)

One of your primary motivations seems to be to introduce selectors to the WPF styling system. But can't the effect of selectors be achieved by taking advantage of implicit styling and adding Styles to the relevant ResourceDictionaries at different levels of the control hierarchy? (In other words, to style Buttons within a particular Grid a special way, put the Style for those Buttons in the Resources of THAT Grid.) I agree that doing so may split up the styling information across the entire XAML, but that's secondary to my question about whether the basic selector-like functionality is present in WPF or not.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bill Kempf  
View profile  
 More options Mar 11 2009, 2:14 pm
From: Bill Kempf <weke...@gmail.com>
Date: Wed, 11 Mar 2009 13:14:44 -0500
Local: Wed, Mar 11 2009 2:14 pm
Subject: Re: [WPF Disciples] Styling WPF with CSS

I think it's fascinating, though whether or not it's useful remains to be
seen.  So definitely in the "has potential" camp.

On Wed, Mar 11, 2009 at 12:19 PM, Colin Eberhardt <colin.eberha...@gmail.com

--
Quidquid latine dictum sit, altum sonatur.
- Whatever is said in Latin sounds profound.

War is peace. Freedom is slavery.  Bugs are features.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pavan Podila  
View profile  
 More options Mar 11 2009, 2:19 pm
From: Pavan Podila <pavan.pod...@gmail.com>
Date: Wed, 11 Mar 2009 11:19:32 -0700 (PDT)
Local: Wed, Mar 11 2009 2:19 pm
Subject: Re: Styling WPF with CSS
I would classify this under "Interesting". Whenver you talk about
selectors, you are implicity assuming that you have some knowledge of
the visual tree. This is true for parent-child, sibling and nested
selectors. Having a CSS stylesheet that assumes a lot about the visual
tree is dangerous since you can be replacing templates on the fly.

That's my take.

- Pavan

On Mar 11, 2:14 pm, Bill Kempf <weke...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Brown  
View profile  
 More options Mar 11 2009, 2:29 pm
From: Mike Brown <mbrow...@gmail.com>
Date: Wed, 11 Mar 2009 14:29:35 -0400
Local: Wed, Mar 11 2009 2:29 pm
Subject: Re: [WPF Disciples] Re: Styling WPF with CSS

Yeah but all of it falls under the designer's domain. I think it's
interesting...especially in the context of a Native WPF HTML rendering
engine. Bear with me and I'll show you what I'm talking about soon.

On Wed, Mar 11, 2009 at 2:19 PM, Pavan Podila <pavan.pod...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jaime Rodriguez  
View profile  
 More options Mar 11 2009, 2:34 pm
From: Jaime Rodriguez <jai...@microsoft.com>
Date: Wed, 11 Mar 2009 11:34:36 -0700
Local: Wed, Mar 11 2009 2:34 pm
Subject: RE: [WPF Disciples] Styling WPF with CSS
Colin,

CSS support for SL was  probably the top 5 questions I used to get in the early SL days .. so I agree you are onto something..

I was surprised at the approach; I always envisioned this being a CSS parser that created Styles to be used in SL ...  I never expected people to want css syntax inside SL or WPF..  That said, any thing you accomplish in this space is I am sure helpful to the SL community..

I actually have been thinking about (and fighting hard) the urge for a HTML to XAML converter..  One of the things that discourages me from trying it is that I have no way to parse and properly apply CSS ...  If you solve that, then my biggest hurdle is over and the XSLTing should be easier..  

Cheers,


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tamir Khason  
View profile  
 More options Mar 11 2009, 2:38 pm
From: Tamir Khason <tam...@gmail.com>
Date: Wed, 11 Mar 2009 20:38:13 +0200
Local: Wed, Mar 11 2009 2:38 pm
Subject: Re: [WPF Disciples] Re: Styling WPF with CSS
I see it very abusive :)

--
Tamir http://khason.net/

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Josh Smith  
View profile  
 More options Mar 11 2009, 2:38 pm
From: Josh Smith <flappleja...@gmail.com>
Date: Wed, 11 Mar 2009 14:38:51 -0400
Local: Wed, Mar 11 2009 2:38 pm
Subject: Re: [WPF Disciples] Re: Styling WPF with CSS

One could say the same thing about a hammer.  ;)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Brown  
View profile  
 More options Mar 11 2009, 4:05 pm
From: Mike Brown <mbrow...@gmail.com>
Date: Wed, 11 Mar 2009 16:05:02 -0400
Local: Wed, Mar 11 2009 4:05 pm
Subject: Re: [WPF Disciples] Re: Styling WPF with CSS

Jaime,
   I'm taking a different approach. I treat the HTML DOM with a hierarchical
item template. This will allow a javascript engine to manipulate the dom
directly and the UI automatically update. So my biggest concern right now is
creating the FrameworkElements that correspond to the various DOM elements.
(and of course down the road would be the Javascript Engine).


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter O'Hanlon  
View profile  
 More options Mar 11 2009, 4:22 pm
From: "Peter O'Hanlon" <pete.ohan...@gmail.com>
Date: Wed, 11 Mar 2009 20:22:47 +0000
Local: Wed, Mar 11 2009 4:22 pm
Subject: Re: [WPF Disciples] Styling WPF with CSS

It's an interesting idea Colin - I can't see that I'd ever want to use it,
but it certainly has some interesting features. How does this play with
Blend? My designer has finally got his head round using Blend for all his
WPF needs, and I don't think he'd want to learn a new way of doing things.

On Wed, Mar 11, 2009 at 5:19 PM, Colin Eberhardt
<colin.eberha...@gmail.com>wrote:

--
Peter O'Hanlon

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Shawn Wildermuth  
View profile  
 More options Mar 11 2009, 4:45 pm
From: "Shawn Wildermuth" <sh...@wildermuth.com>
Date: Wed, 11 Mar 2009 13:45:12 -0700
Local: Wed, Mar 11 2009 4:45 pm
Subject: RE: [WPF Disciples] Re: Styling WPF with CSS

I could see it as useful if it works with Silverlight as the Flex/Flash guys
are used to CSS-style styling.

Thanks,

Shawn Wildermuth

http://wildermuth.com <http://wildermuth.com/>

https://agilitrain.com <http://wildermuthconsulting.com/>

Microsoft MVP (C#), MCSD.NET, Author and Speaker

The Silverlight Tour <http://www.silverlight-tour.com/>  is coming to a city
near you!

From: wpf-disciples@googlegroups.com [mailto:wpf-disciples@googlegroups.com]
On Behalf Of Peter O'Hanlon
Sent: Wednesday, March 11, 2009 1:23 PM
To: wpf-disciples@googlegroups.com
Subject: [WPF Disciples] Re: Styling WPF with CSS

It's an interesting idea Colin - I can't see that I'd ever want to use it,
but it certainly has some interesting features. How does this play with
Blend? My designer has finally got his head round using Blend for all his
WPF needs, and I don't think he'd want to learn a new way of doing things.

On Wed, Mar 11, 2009 at 5:19 PM, Colin Eberhardt <colin.eberha...@gmail.com>
wrote:

Hi All,

I had a crazy idea a few months back about using CSS selectors to
style WPF applications. I finally had the time to put something
together ...

http://www.scottlogic.co.uk/blog/wpf/2009/03/using-css-selectors-for-...
-in-wpf/

I would be interested to know what you guys think. Should I file this
under; "nice idea, has potential", or "crazy idea, what on earth were
you thinking?".

I do think this could have more potential within silverlight. Flex
already allows you to apply styling to your UI using CSS. Not sure how
they map between HTML elements and Flex UI widgets. I also doubt it
uses selectors, which is the main driving force for my idea.

Regards,
Colin E.

--
Peter O'Hanlon


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sacha Barber  
View profile  
 More options Mar 11 2009, 4:44 pm
From: Sacha Barber <sachabar...@hotmail.com>
Date: Wed, 11 Mar 2009 20:44:51 +0000
Local: Wed, Mar 11 2009 4:44 pm
Subject: RE: [WPF Disciples] Styling WPF with CSS

I think this is both neat and crazy.

_________________________________________________________________
View your Twitter and Flickr updates from one place – Learn more!
http://clk.atdmt.com/UKM/go/137984870/direct/01/

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Colin Eberhardt  
View profile  
 More options Mar 12 2009, 4:30 am
From: Colin Eberhardt <colin.eberha...@gmail.com>
Date: Thu, 12 Mar 2009 01:30:48 -0700 (PDT)
Local: Thurs, Mar 12 2009 4:30 am
Subject: Re: Styling WPF with CSS
Hi Jamie,

> Colin,

> CSS support for SL was  probably the top 5 questions I used to get in the early SL days .. so I agree you are onto something..

It doesn't surprise me that this is in the top 5 questions about
Silverlight. Personally I don't think it really *needs* CSS styling,
it is just that the current system for styling looks so similar to
certain aspects of CSS that people are always going to ask the
question.

I will definitely look into porting this to Silverlight.

> I actually have been thinking about (and fighting hard) the urge for a HTML to XAML converter..  One of the things that discourages me from trying it is that I have no way to parse and properly apply CSS ...  If you solve that, then my biggest hurdle is over and the XSLTing should be easier..  

That sounds interesting. Surely another hurdle you face is the mapping
to HTML elements to Silverlight elements? I presume you would only map
to a sub-set for Silverlight elements - for example, I cannot see how
you could ever infer the usage of a StackPanel from inspecting some
HTML.

Regards, Colin E.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Colin Eberhardt  
View profile  
 More options Mar 12 2009, 4:31 am
From: Colin Eberhardt <colin.eberha...@gmail.com>
Date: Thu, 12 Mar 2009 01:31:55 -0700 (PDT)
Local: Thurs, Mar 12 2009 4:31 am
Subject: Re: Styling WPF with CSS
Hi Marlon,

On Mar 11, 5:56 pm, Marlon Grech <marlongr...@gmail.com> wrote:

> any thing that has to do with selectors is a good idea :P I love selectors
> they can be used for so much.... for example look at JQuery.... I like your
> idea and I think it makes a lot of sense....

Thanks. I have only used JQuery a few times - but yes, you are right,
it is an excellent application of CSS selectors, used well beyond the
scope of just styling.

Colin E.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Colin Eberhardt  
View profile  
 More options Mar 12 2009, 4:39 am
From: Colin Eberhardt <colin.eberha...@gmail.com>
Date: Thu, 12 Mar 2009 01:39:20 -0700 (PDT)
Local: Thurs, Mar 12 2009 4:39 am
Subject: Re: Styling WPF with CSS
Hi David,

I where you are coming from, you would consider using global
(implicit) styles and adding local, more specific styles. This sounds
like a very reasonable approach. However, the CSS approach has a few
advantages:

1. When designing your XAML, you do not have to decide in advance
whether an element needs styles or not (i.e. whether to add a "Style=
{StaticResource ...}" to the XAML). Styling can be a separate
activity.

2. One of the powers of CSS is that multiple rules can match the same
element, this is the 'cascade'. This WPF implementation also has this
feature (however, my implementation does not use any weighting logic
when applying the style).

3. My implementation does not require that you target a specific type
with your styles, this combined with the ability to merge styles
allows for much greater power.

Regards,
Colin E.

On Mar 11, 5:56 pm, David Anson <david...@microsoft.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Colin Eberhardt  
View profile  
 More options Mar 12 2009, 4:43 am
From: Colin Eberhardt <colin.eberha...@gmail.com>
Date: Thu, 12 Mar 2009 01:43:00 -0700 (PDT)
Subject: Re: Styling WPF with CSS
Hi Peter,

> It's an interesting idea Colin - I can't see that I'd ever want to use it,
> but it certainly has some interesting features. How does this play with
> Blend? My designer has finally got his head round using Blend for all his
> WPF needs, and I don't think he'd want to learn a new way of doing things.

A very good point. All the designers I have worked with in the past
use PhotoShop. Also, I have very rarely used Blend myself.

Considering my lack of experience, I'll ask the question right back at
you ...

Do you think it could work within Blend?

Thanks Peter, looking forward to your response ;-)

Regards,
Colin E.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter O'Hanlon  
View profile  
 More options Apr 19 2009, 5:00 pm
From: "Peter O'Hanlon" <pete.ohan...@gmail.com>
Date: Sun, 19 Apr 2009 22:00:09 +0100
Local: Sun, Apr 19 2009 5:00 pm
Subject: Re: [WPF Disciples] Re: Styling WPF with CSS

Colin - I threw this question to my designer, and he finally got back to me
with an answer. His feeling was that it would work, but it would put certain
constraints in his way which would mean that he'd have to do a bit more
planning up front, rather than just sitting down and "brainstorming".

On Thu, Mar 12, 2009 at 9:43 AM, Colin Eberhardt
<colin.eberha...@gmail.com>wrote:

--
Peter O'Hanlon

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kentcb@internode.on.net  
View profile  
 More options Apr 20 2009, 4:38 am
From: "ken...@internode.on.net" <ken...@internode.on.net>
Date: Mon, 20 Apr 2009 01:38:52 -0700 (PDT)
Local: Mon, Apr 20 2009 4:38 am
Subject: Re: Styling WPF with CSS
That's amazing stuff, Colin - well done. I can certainly see utility,
especially if this is incorporated into WPF/SL proper.

Best,
Kent


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Colin Eberhardt  
View profile  
 More options Apr 20 2009, 9:14 am
From: Colin Eberhardt <colin.eberha...@gmail.com>
Date: Mon, 20 Apr 2009 06:14:09 -0700 (PDT)
Local: Mon, Apr 20 2009 9:14 am
Subject: Re: Styling WPF with CSS
Thanks Peter,

Oh to be a Designer, free to brainstorm without being weighed down by
the need for up front planning!

Thanks for the information. The way I have always tended to work with
designers (for vanilla HTML websites) is to let them do the arty bits,
leaving the technical implementation of CSS and HTML to myself.

How does it work with WPF / CSS, is it a similar process of the
developer refining the design? Or with Blend in his toolkit do you
expect your Designer to come up with production ready code?

Hi Kent,

> That's amazing stuff, Colin - well done. I can certainly see utility,
> especially if this is incorporated into WPF/SL proper.

Many thanks - glad you like it. When I have a suitable moment I plan
to extend this idea to Silverlight, adding a text-based CSS-like
syntax, and possible a mechanism for mapping HTML elements to XAML, I
want to see if you can share CSS between a website and its embedded SL
content.

Regards,
Colin E.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter O'Hanlon  
View profile  
 More options Apr 20 2009, 9:37 am
From: "Peter O'Hanlon" <pete.ohan...@gmail.com>
Date: Mon, 20 Apr 2009 14:37:17 +0100
Local: Mon, Apr 20 2009 9:37 am
Subject: Re: [WPF Disciples] Re: Styling WPF with CSS

In most cases, with the HTML/CSS stuff, our designer has tended to produce
the base framework himself. He uses PhotoShop to produce several samples,
and Dreamweaver to play about with them using good old Lorem Ipsum. The
technical side is taken care of by the devs, with some input on the CSS, but
mainly it's down to the designer - after all, he tends to be the one who
looks after the overall look and feel.

We've adopted a similar approach with VS and Blend, but there's more play
with the code thanks to MVVM than was possible in ASP.NET. When I have time,
I might just write some posts about how a project typically plays out for
us, with the different roles that each plays.

We've moved heavily into MVVM precisely because we were finding it difficult
to get the designers involvement throughout the development - we either had
to wait for him to produce prototypes and then we added the functionality,
or he waited until we'd produced enough code for him to "make pretty."
Neither way was very satisfying or productive, and just ended up costing
more time than we wanted to spend. With MVVM, Mark spends a week or so
thrashing out some protoype artwork and assets, while we get the base code
in place, and then he starts pulling the bits together. BTW - the big
advantage for us here, is that the devs (frustrated artists the lot of
them), can also get involved on the design side if they so desire.

On Mon, Apr 20, 2009 at 2:14 PM, Colin Eberhardt
<colin.eberha...@gmail.com>wrote:

--
Peter O'Hanlon

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »