WinForms — Tips & Tricks, February 2021

WinForms Team Blog
04 February 2021

I hope all of you and your family are doing well.

Before I get into this month’s WinForms Tips & Tricks, a quick word about our 2021 roadmap. Yes, we expect to publish it shortly. Thanks for investing time and answering our many surveys over the last few months. Your feedback is invaluable.

With that — let's take a look at a few interesting WinForms-related customer questions we answered recently. Hopefully they will be of value as you build your next WinForms project.

  • Tile View: How to display images with image paths stored in a data source (T954414)

    If you ever worked with DevExpress Tiles, you know that a tile layout is built from individual Tile Elements - building blocks that can include an image, a text string, or both. In Tile View, each element can bind to a data source field. If a data field stores images, a Tile Element can display it on a tile’s surface. This is great, but what if the data source does not store images, and instead stores a local storage path to the image(s)? In this instance, you can handle the ItemCustomize event to load images and assign them to Tile Elements. Download the sample attached to this support ticket to see this capability in action.
  • Data Grid: How to pass custom cell colors from the RowCellStyle event to an Edit Form (T954801)

    The RowCellStyle event allows you to customize individual Grid cells, and the EditFormPrepared grants access to Edit Form editors. This ticket demonstrates how to synchronize these events so that Edit Form and in-place editors maintain a unified appearance.

  • How to access EditValue of in-place editors (T954902)

    EditValue — a property available for any DevExpress editor – one that stores the current editor value — is only available at the editor level. Data containers that utilize in-place editors (such as our WinForms Data Grid or Tree List) create these editors only when data is being edited. The rest of the time you only have access to Repository Items that have no EditValue property. The logical question is how to obtain the current editor value if the editor does not yet exist? This ticket offers two solutions to this question.
  • DockManager: How to enable the 'Dock' menu item (T955603)

    If you have multiple dock panels some of which are floating, your users may wonder why a right-click on a floating panel's header displays a menu with a grayed-out "Dock" command.

    This command returns the floating panel back to its last known dock position, so if it has none - the command is disabled. If you'd like to avoid this confusion, do not create floating panels initially. Instead, dock them to their suggested locations and call the MakeFloat method. This way your floating panels will have a place to go when docked, and their 'Dock' command will be enabled.
  • How to determine if an AppearanceObject was modified (T955686)

    If you actively change appearance settings for normal\hovered\pressed states in code, you may want to check whether the current AppearanceObject is in its default state, or has already been modified. This ticket showcases an answer: you can compare any AppearanceObject with AppearanceObject.EmptyAppearance. If both objects are equal, your current appearance has not yet been changed.
  • TileView: How to hide tiles (T956010)

    TileView tiles have no "Visible" property. To hide specific tiles you need to do the same you would've done with standard Grid View records: apply a filter that will exclude unwanted rows. This ticket demonstrates how to handle the CustomRowFilter event to achieve this goal.
  • Splash Screen Manager: How to customize Overlay Forms (T943132)

    Overlay Forms stretch across an entire parent control or form and prevent users from interacting with it. These forms are an excellent way to indicate an ongoing operation and protect a busy control from unwanted changes. Another benefit of these forms is that you can create a custom painter to completely alter their appearance and layout. This ticket demonstrates how to utilize this technique to hide a default loading indicator from an Overlay Form.

As always, we welcome your thoughts and feedback. Should you have any questions related to these support tickets, please do post a comment in the relevant Support Center thread.

Have a great day.

Showcase Your Apps on DevExpress.com

Highlight your business app and share your development experiences with the DevExpress community. To include your app in our upcoming App Showcase, please forward an application screenshot to clientservices@devexpress.com and tell us which DevExpress products you currently use within your organization.
dbSoft
dbSoft

Thank you Dmitry. All these information are very valuable to us. Please keep us informed for all tips and tricks. We are working very much using tileview. We believe that tileview is a very powerfull tool. Please keep in mind if developers can make TileView groupRows expandable. It would be very useful for our products.

4 February 2021
Dmitry (DevExpress)
Dmitry (DevExpress)

@dbSoft Thank you, I really appreciate your feedback. Knowing these posts have value for readers is an excellent motivator :)


As for your suggestion regarding collapsible TileView groups - I've passed it directly to the developers in charge. The immediate response was that the suggestion is very solid and useful. Moreover, I can even share with you that attempts to implement this feature have already been made. Unfortunately, there were some difficulties, and all changes have been rolled back. I wouldn't bet that this feature will be released in v21.1, but there's definitely an understanding that it has to be done.

4 February 2021
Christopher Jay
Christopher Jay
Great tips, thanks!  Still learning new stuff after a decade.
4 February 2021

Please login or register to post comments.