C1NumericBox Text Centering

Posted by: james on 7 November 2024, 1:26 am EST

  • Posted 7 November 2024, 1:26 am EST

    I feel like I am missing something, either from the documentation or just in general regarding the C1 Blazor controls.

    I’m having an issue with the C1NumericBox where I cannot center the text within the box.

    I have checked:

    https://developer.mescius.com/componentone/docs/blazor/online-blazor/numericoverview.html

    and

    https://developer.mescius.com/componentone/demos/blazor/blazorserverexplorer/NumericBox/Index

    They both don’t mention text centering.

    I have tried modifying the Style property with TextAlign, the same way the doc mentions how to change width and border colour etc…, but it has no effect.

    Style=“@(new C1Style(){ TextAlign = C1StyleTextAlign.Center })”

    In writing this post, I did a bit of inspection through the browser and solved it by a way I’ve solved something similar in the past, which was by finding the embedded class, and adding in a modification in CSS.

    In short, I did the following in my CSS:

    .c1-numeric-box-input-inner {

    text-align: center;

    }

    I feel that Text alignment should be supported via the Style method, the same way the documentation mentions border color etc…

    Or at least, the documentation should make reference to the “supported” styles available through the Style method, and then for everything else, it should reference the classes that can be overwritten in CSS to get additional styles.

    Will there be updates to the Blazor documentation?

    Will there be any documentation specifically around styling?

    Will the styling paradigm get a birthday?

    Thanks for your feedback.

    Kind Regards

    James

  • Posted 7 November 2024, 12:02 pm EST

    Hi James,

    Thank you for bringing this to our attention, and I apologize for any inconvenience this may have caused.

    It appears that there is an issue with applying the TextAlign property to the C1TextBox using C1Style. I’ve escalated this to our development team for further investigation, and they are actively looking into it. The internal tracking ID for this issue is C1XAML-36830. In the meantime, you may continue to use the CSS workaround.

    We are committed to regularly updating our documentation to include the latest properties and examples. Currently, the Style property is designed to accept the C1Style object, which should apply all style properties included within it, as detailed in our documentation here: https://developer.mescius.com/componentone/docs/blazor/online-blazor/C1.Blazor.Core~C1.Blazor.Core.C1Style.html. If there are any issues with certain styles not being applied, rest assured that we are looking into it.

    I’ll also pass along your feedback to our documentation team and will keep you updated on any progress.

    Regards,

    Ankit

  • Posted 7 November 2024, 9:36 pm EST

    Hi Ankit

    Thanks. I appreciate it.

    Kind Regards

    James

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels