Quantcast
Channel: Developer Express Inc.
Viewing all articles
Browse latest Browse all 2370

WinForms — Tips & Tricks, February 2021

$
0
0

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.


Viewing all articles
Browse latest Browse all 2370

Trending Articles