Home Forums WPF controls Xceed DataGrid for WPF Changing the TodayContent

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #27177 |

    Hi. In a related (I think it is related) question, I’ve noticed that the DatePicker does automatically reflect the Day names, and month names of the current culture of the current thread.

    However, the word ‘Today’ is not translated. I noticed there is a property on the DatePicker called ‘TodayContent’ but I have been unsuccessful in overriding the display to show a translated string instead of ‘Today’.  Is this a bug with the datepicker?  Or am I just going about things in a wrong manner?

    Cheers,

    Kevin.

    Imported from legacy forums. Posted by Kevin (had 976 views)

    Xceed Support
    Member
    Post count: 5658

    I have tested the TodayContent property and the new value was reflected in the DatePicker’s calendar:

    TodayContent

    =”Aujourd’hui”

    Is this how you were attempting to change the property?

    Imported from legacy forums. Posted by Jenny [Xceed] (had 1050 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi Jenny,

    I’m displaying a date column in a datagrid, and in edit mode it brings up the datepicker.
    Since I don’t have an actual DatePicker tag in my xaml, I wasn’t sure how to change it.

    I did try adding a style to the grid that’s hosting the DataGrid:
    <Grid.Resources>
      <Style TargetType=”xcdg:DatePicker”>
        <Setter Property=”TodayContent” Value=”aujourd’hui”/>
      </Style>
    </Grid.Resources>

    This isn’t working for me, so I’m not sure what the correct approach is.  
    Thanks for your help.

    Kevin.

    Imported from legacy forums. Posted by Kevin (had 636 views)

    Xceed Support
    Member
    Post count: 5658

    Adding the style to the resources of your DataGridControl should solve the problem.

    Imported from legacy forums. Posted by Jenny [Xceed] (had 477 views)

    User (Old forums)
    Member
    Post count: 23064

    Thanks for the quick answers Jenny 🙂

    However, I noticed that if I do this, I lose all the other styling on the datepicker.  It used to match the theme i was using, (i’m using the GlassTheme from the pro version.) but as soon as i add this style, it locks the DatePicker to be white with blue headers.  Is this the intended behaviour?  Does changing the TodayContent mean that I have to specifically style everything else in the DatePicker too?

    Imported from legacy forums. Posted by Kevin (had 757 views)

    User (Old forums)
    Member
    Post count: 23064

    Can you send a email at support@xceedsoft.com requesting the template of the glass datePicker? I’ll send you the template in question this way you’ll be able to modify the desired sections.

    Imported from legacy forums. Posted by Matt (had 1453 views)

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.