TexAlignment property of a column

14 posts, 0 answers
  1. Patrick
    Patrick avatar
    372 posts
    Member since:
    Aug 2012

    Posted 30 Jun 2015 Link to this post

    Hello,

    it seems that the TextAlignment property of a column is no more taken into account in the Q2 2015 version, with the Office2013 theme.

  2. Stefan X1
    Admin
    Stefan X1 avatar
    514 posts

    Posted 02 Jul 2015 Link to this post

    Hello Patrick,

    I have attached is a sample project, in which the TextAlignment property of GridViewDataColumn works correctly with Office2013 theme. Can you please take a look at it and let me know if I am missing something?

    Regards,
    Stefan
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
  4. Patrick
    Patrick avatar
    372 posts
    Member since:
    Aug 2012

    Posted 03 Jul 2015 in reply to Stefan X1 Link to this post

    Stefan,

    I will take a more in depth look after my holidays.
    What I'm currently is that it was working with Q1 2015 SP1 and that it doesn't work with Q2 2015.

    My scenario is much more complicated that just a single grid view in a window: the main window is a RibbonWindow, with a Ribbon and a Docking. Inside one of the panes (created dynamically, when the user clicks on a command in the ribbon), I have a TabControl, each tab containing a grid view and some other controls. The TabItem are created dynamically, because the ones to display depends on the data.

    So I need to simplify the application just to look where the problem is.

  5. Stefan X1
    Admin
    Stefan X1 avatar
    514 posts

    Posted 06 Jul 2015 Link to this post

    Hello Patrick,

    The demo application I attached was tested with Q2 2015 version.

    If you manage to isolate the issue in a sample project, you can send it to us as an attachment in a new support thread, so we can debug it on our side. You can take a look at the Isolating a problem in a sample project blog post for more information.

    Best Regards,
    Stefan
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  6. Alexey
    Alexey avatar
    1 posts
    Member since:
    May 2014

    Posted 06 Jul 2015 Link to this post

    If the value of the TextAlignment set using style setter, the text in the cell grid view is not aligned.

    Sample:

    <Style x:Key="NameColumnStyle" TargetType="telerik:GridViewDataColumn">
        <Setter Property="TextAlignment" Value="Right"/>
    </Style>

     <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" Style="{StaticResource NameColumnStyle}"/>

  7. Stefan X1
    Admin
    Stefan X1 avatar
    514 posts

    Posted 08 Jul 2015 Link to this post

    Hello Alexey,

    Thank you for your feedback.

    I investigated the problem and it seems that it is an issue on our side. I have logged it in our bug tracking system. You can check its progress in our Feedback Portal: TextAlignment not respected when applied through Style for GridViewDataColumn.

    Best Regards,
    Stefan
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  8. Patrick
    Patrick avatar
    372 posts
    Member since:
    Aug 2012

    Posted 30 Sep 2015 Link to this post

    Evgenia,
    3 months later and two new versions: the problem is still here...
  9. Stefan X1
    Admin
    Stefan X1 avatar
    514 posts

    Posted 05 Oct 2015 Link to this post

    Hello Patrick,

    As of Q2 2015 the following issue has been fixed: TextTrimming, TextAlignment and TextWrapping properties set through an implicit style targeting TextBlock is not applied on scrolling.
    So, a possible approach for this case would be to update your binaries version and try applying a Style targeting TextBlock. I hope this fits your requirements.

    Best Regards,
    Stefan
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  10. Patrick
    Patrick avatar
    372 posts
    Member since:
    Aug 2012

    Posted 05 Oct 2015 in reply to Stefan X1 Link to this post

    Stefan,
    as stated on my first post, the problem started showing at the Q2 2015 version. I'm currently using Q3 2015 and the problem is still here.
    One of the column, for example, is defined as:

    <tk:GridViewDataColumn DataMemberBinding="{Binding NoPlayer1}"
                           HeaderTextAlignment="Right"
                           IsFilterable="False"
                           IsGroupable="False"
                           TextAlignment="Right"
                           UniqueName="NoPlayer1"
                           Width="50"/>

    And the column content is left aligned!
    So the problem is not related to a style.

    If you want, I can send, in a private message, an URL where you can download the application to take a look.

  11. Stefan X1
    Admin
    Stefan X1 avatar
    514 posts

    Posted 08 Oct 2015 Link to this post

    Hello Patrick,

    If you do not need to use an implicit style, but set the TextAlignment property directly it should be applied. I am attaching a sample application as a demonstration. I have tested it with 2015.2.623 version.

    Can you please check it out and let me know in case I am missing something?

    Regards,
    Stefan X1
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  12. Patrick
    Patrick avatar
    372 posts
    Member since:
    Aug 2012

    Posted 08 Oct 2015 in reply to Stefan X1 Link to this post

    Stefan,

    I know that, in simple cases, the alignment is working.

    My case is much more complicated, because the application contains a Docking, one pane contains a TabControl and a tab contains the GridView. In addition, the GridView is defined as a custom control (to be reusable).

    That's why I can provide you with the application and the source if needed.
    I can't want to make it public, but I can give you the information in a private message, if possible.

    Note also that the application was working fine until version Q2 2015 is out and you correct something on it...

  13. Yoan
    Admin
    Yoan avatar
    1066 posts

    Posted 09 Oct 2015 Link to this post

    Hello Patrick,

    It will be great if you can provide your sample project which demonstrates the issue. Please open new support ticket and attach it there. I will debug it on my side and I will assist you further.

    Regards,
    Yoan
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  14. Patrick
    Patrick avatar
    372 posts
    Member since:
    Aug 2012

    Posted 13 Oct 2015 in reply to Yoan Link to this post

    Yoan,

    I've posted a support ticket with a link to the application and its source code.

    Waiting to have news about this problem.

  15. Yoan
    Admin
    Yoan avatar
    1066 posts

    Posted 15 Oct 2015 Link to this post

    Hello Patrick,

    I will update the other thread once I have more information about the problem.

    Regards,
    Yoan
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for WPF is Visual Studio 2017 Ready