Ticket T284008
Visible to All Users

Horizontal alignment problem in Web app

created 10 years ago

Hello,

I have a cross-platform XAF application that is producing incorrect horizontal alignment of two labels on one detail view. Please see attached screen image. This is not happening on other controls nor other views, web or win versions.

Note that a particularity of this application is that the words "Job", "Drawing", and "Stockbill" are encoded in the captions using meta-syntax like

[ModelDefault("Caption", "{JobItemName,s,t} Test")]

Caption parsing and replacement is performed in the platform-agnostic Module.cs handler for Application.LoggedOn. The image shows that this parsing works correctly for other captions. I added 'Test' to the first caption to see if the presence of text after the meta-syntax was the issue, but the caption remains left-justified. If I completely disable the substitution the issue remains. If I change the caption for this property to have only normal text the issue remains.

When I examine the CSS of the detail view I see that the correctly-aligned labels have classes "Caption haRight vaTop" defined, but the problematic ones have "Caption  " (with two trailing spaces). Other than this the markup looks correct and 'clean'. I can find no web application model overrides that might affect the alignment.

Is there a web equivalent of Model.User.xafml that retains model changes?

Can you suggest what might cause this, or where I can look for the source of the problem?

Thank you,
Mark

Show previous comments (3)

    Michael,
    I have reproduced the problem but not reliably. However, I can reliably reproduce a similar problem. Start with any new XAF project, Win-only is fine, create a business class, and then:

    1. Open the model editor and navigate to Options -> LayoutManagerOptions.
    2. Set CaptionHorizontalAlignment = Far, CaptionVerticalAlignment = Top, and CaptionWordWrap = Wrap.
    3. Navigate to any unmodifed detail view Layout and open Customize Layout.
    4. Drag and drop an Empty Space Item from the Customization dialog onto the detail view, then close the dialog.
    5. Open Show Differences (Current Aspect) and notice the number of nodes set SizeConstraintsType="Default". This does not appear to have any bad affects, but the model editor should not be creating spurious model differences by overriding Default with Default.
    6. Notice also that the Empty Space Item has all four attributes set to Default.
      This last behavior is also innocuous when it happens to an Empty Space Item, but I just saw it happen to a form node with a non-null ViewItem, just as I described in my initial post.
      I executed this Unix command on a medium-sized XAF Win-only application that's been in production for six months:
      grep -c SizeConstraintsType Model.DesignedDiffs.xafml; grep -c CaptionHorizontalAlignment Model.DesignedDiffs.xafml
      The counts were 416 and 132! I can guarantee that I did not set all of those. Heck, I don't even know what SizeConstraintsType means!
      I think the reason this issue has gone unnoticed is because the LayoutManagerOptions must be set to non-default values to make it happen.
      Please try the scenario above and let me know what happens. Meanwhile, I'll continue to try to create a reproducible case for a non-empty LayoutViewItem.
      Thank you,
      Mark
    DevExpress Support Team 10 years ago

      Thank you for the additonal information. I have replicated the serialization issue and created a separate ticket about this unusual behavior: T286097. We will research why this happens and whether this behavior is correct or not.

      As for the original issue discussed in this thread, please let me know whether you have found where the model was customized or you need further assistance. In the latter case, provide us with a sample project for review.

      MD MD
      Mark Davison 2 9 years ago

        Michael,
        Since you created a separate ticket we can close this one.
        Mark

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.