Grid Fields Display Name Wrapping

4 posts, 0 answers
  1. Stevo
    Stevo avatar
    25 posts
    Member since:
    Jun 2013

    Posted 09 Oct 2013 Link to this post

    Hi,

    we would like to do some tweaks in Property Grid Fields styling. Sometimes the property names are too long and overlap with the fields.

     I suppose the way to go is to edit the GridField template, but we are struggling to find it/generate it in Blend (using the Windows8 Theme).

    Any ideas?
    Thanks,
    Stevo
  2. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1128 posts

    Posted 11 Oct 2013 Link to this post

    Hi,

     Are you using the StyleManager theming mechanism, or the newer implicit-style-based one? Basically, you might avoid editing the template by subscribing to FieldLoaded, searching the visual tree for the label element and setting the property there, using the ChildrenOfType method. However, this approach might be a little bit slower.

    Regards,
    Ivan Ivanov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Stevo
    Stevo avatar
    25 posts
    Member since:
    Jun 2013

    Posted 11 Oct 2013 Link to this post

    Hi Ivan,

    We are setting the theme in code
    Telerik.Windows.Controls.StyleManager.ApplicationTheme = new Windows8Theme();

    I suppose the FieldLoaded event would work, but the Property Grid with 80 fields is very slow, there is about 1 second delay between when the 'Item' is set and the values are actually rendered.

    Any tips how to make it better performing?

    Before we just simply had 80 <label>:  <textblock> template items in a stack panel (the data is readonly) and that performed much better.
    Thanks,
    Stevo
  5. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1128 posts

    Posted 11 Oct 2013 Link to this post

    Hi,

    Yes, the styling approach should definitely be faster. You may try retrieving the template from here: Telerik\RadControls for WPF Q2 2013\Themes\WPF40\Windows8\Themes\Telerik.Windows.Controls.Data.xaml. Our StyleManager theming mechanism applies theme at runtime, so that IDE's designer retrieves the default theme's resource (OfficeBlack). Aside from the theming topic, you may try setting RenderMode=Flat and see whether there is any performance improvement in your scenario.

    Regards,
    Ivan Ivanov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top