How to add vertical align attribute to designer

Discussion in 'ASP .Net Building Controls' started by James Geurts, Aug 16, 2005.

  1. James Geurts

    James Geurts Guest

    Hi,

    I am trying to add designer support to my custom web control. It's similar
    to the Panel control and I'd like to allow the user to specify vertical
    align. I'm not quite sure what style is supported in the vs.net designer,
    though.

    So... in the OnBehaviorAttached() method of my designer class, I do
    something like:

    this.Behavior.SetStyleAttribute("vertical-align", true,
    Enum.Format(typeof(VerticalAlign), propertyValue, "G"), true);

    It doesn't appear that "vertical-align" is a valid style. Can someone tell
    me what style I need to specify to accomplish this?

    Also, is there a list of styles (and attributes) that are supported by the
    vs.net designer?

    Thanks

    Jim
     
    James Geurts, Aug 16, 2005
    #1
    1. Advertising

  2. James Geurts

    Jeff Bowman Guest

    Oops--layers don't support vertical alignment. It's a CSS issue, not a VS.NET
    designer issue.

    Now, that said, you might be able to find a CSS hack on Google--it's a hot
    topic.




    James Geurts wrote:
    > Hi,
    >
    > I am trying to add designer support to my custom web control. It's similar
    > to the Panel control and I'd like to allow the user to specify vertical
    > align. I'm not quite sure what style is supported in the vs.net designer,
    > though.
    >
    > So... in the OnBehaviorAttached() method of my designer class, I do
    > something like:
    >
    > this.Behavior.SetStyleAttribute("vertical-align", true,
    > Enum.Format(typeof(VerticalAlign), propertyValue, "G"), true);
    >
    > It doesn't appear that "vertical-align" is a valid style. Can someone tell
    > me what style I need to specify to accomplish this?
    >
    > Also, is there a list of styles (and attributes) that are supported by the
    > vs.net designer?
    >
    > Thanks
    >
    > Jim
     
    Jeff Bowman, Aug 16, 2005
    #2
    1. Advertising

  3. James Geurts

    James Geurts Guest

    Maybe I'm missing something, but how do layers factor into the designer? The
    vs.net designer is just a glorified IE control, right? Is it that a
    ReadWriteControlDesigner is not rendered as a div or span in the designer
    view?

    Again, I would like to know the styles and attributes that are supported
    with the vs.net designer...

    btw, vertical alignment is supported by CSS:
    http://www.w3.org/TR/CSS1#vertical-align

    Thanks

    Jim

    "Jeff Bowman" wrote:

    > Oops--layers don't support vertical alignment. It's a CSS issue, not a VS.NET
    > designer issue.
    >
    > Now, that said, you might be able to find a CSS hack on Google--it's a hot
    > topic.
    >
    >
    >
    >
    > James Geurts wrote:
    > > Hi,
    > >
    > > I am trying to add designer support to my custom web control. It's similar
    > > to the Panel control and I'd like to allow the user to specify vertical
    > > align. I'm not quite sure what style is supported in the vs.net designer,
    > > though.
    > >
    > > So... in the OnBehaviorAttached() method of my designer class, I do
    > > something like:
    > >
    > > this.Behavior.SetStyleAttribute("vertical-align", true,
    > > Enum.Format(typeof(VerticalAlign), propertyValue, "G"), true);
    > >
    > > It doesn't appear that "vertical-align" is a valid style. Can someone tell
    > > me what style I need to specify to accomplish this?
    > >
    > > Also, is there a list of styles (and attributes) that are supported by the
    > > vs.net designer?
    > >
    > > Thanks
    > >
    > > Jim

    >
    >
    >
     
    James Geurts, Aug 17, 2005
    #3
  4. James Geurts

    Jeff Bowman Guest

    James Geurts wrote:
    > Maybe I'm missing something, but how do layers factor into the designer? The


    The Panel control emits DIVs, which are layers.



    > vs.net designer is just a glorified IE control, right? Is it that a
    > ReadWriteControlDesigner is not rendered as a div or span in the designer
    > view?


    AFAIK, there's no way to access the HTML in designer view.



    > Again, I would like to know the styles and attributes that are supported
    > with the vs.net designer...


    That one I don't know. In fact I'm kind of curious myself.



    > btw, vertical alignment is supported by CSS:
    > http://www.w3.org/TR/CSS1#vertical-align


    Yes, for inline elements such as SPAN. DIV is a block-level element.

    http://google.com/search?q=css div vertical alignment



    >
    > Thanks
    >
    > Jim
    >
    > "Jeff Bowman" wrote:
    >
    >> Oops--layers don't support vertical alignment. It's a CSS issue, not a VS.NET
    >> designer issue.
    >>
    >> Now, that said, you might be able to find a CSS hack on Google--it's a hot
    >> topic.
    >>
    >>
    >>
    >>
    >> James Geurts wrote:
    >>> Hi,
    >>>
    >>> I am trying to add designer support to my custom web control. It's similar
    >>> to the Panel control and I'd like to allow the user to specify vertical
    >>> align. I'm not quite sure what style is supported in the vs.net designer,
    >>> though.
    >>>
    >>> So... in the OnBehaviorAttached() method of my designer class, I do
    >>> something like:
    >>>
    >>> this.Behavior.SetStyleAttribute("vertical-align", true,
    >>> Enum.Format(typeof(VerticalAlign), propertyValue, "G"), true);
    >>>
    >>> It doesn't appear that "vertical-align" is a valid style. Can someone tell
    >>> me what style I need to specify to accomplish this?
    >>>
    >>> Also, is there a list of styles (and attributes) that are supported by the
    >>> vs.net designer?
    >>>
    >>> Thanks
    >>>
    >>> Jim
     
    Jeff Bowman, Aug 17, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kay
    Replies:
    2
    Views:
    7,165
  2. Rabbit
    Replies:
    1
    Views:
    2,757
    Shimon Sim
    Feb 12, 2006
  3. shank

    vertical-align: bottom

    shank, Oct 2, 2003, in forum: HTML
    Replies:
    9
    Views:
    20,935
    brucie
    Oct 3, 2003
  4. Jochen Fuhrmann

    vertical-align and div

    Jochen Fuhrmann, Oct 6, 2003, in forum: HTML
    Replies:
    1
    Views:
    24,465
    Steve Pugh
    Oct 6, 2003
  5. Tobias Müller

    div and vertical align

    Tobias Müller, Nov 25, 2003, in forum: HTML
    Replies:
    2
    Views:
    683
    Steve Pugh
    Nov 25, 2003
Loading...

Share This Page