Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to integrate a gauge control for visualizing a value of a business class property

$
0
0

Scenario
This example demonstrates a possible integration of the DevExpress gauge controls in XAF for representing various types of business class properties. For this, custom WinForms and ASP.NET PropertyEditor classes were implemented:


Steps to implement

1. Copy and include the GaugePropertyEditor.Win and GaugePropertyEditor.Web projects into your solution and make sure it is built successfully.

2. Invoke the Application Designer for the YourSolutionName/WinApplication.xx file by double-clicking it in the Solution Explorer. Invoke the Toolbox (Alt+X+T) and then drag & drop the GaugePropertyEditorWindowsFormsModule component into the modules list on the left.
3. Invoke the Application Designer for the YourSolutionName/WebApplication.xx file by double-clicking it in the Solution Explorer. Invoke the Toolbox (Alt+X+T) and then drag & drop the GaugePropertyEditorAspNetModule component into the modules list on the left.
4. Define a string persistent property within your business class and decorate it with the DevExpress.Persistent.Base.EditorAliasAttribute passing the corresponding PropertyEditor alias string as a parameter. See the WinWebSolution.Module\GaugeDemoObject.cs .xx file for an example.



 

See Also:
PropertyEditor Class
Class ASPxGaugeControl
Class GaugeControl
PropertyEditors - Integrate gauge controls
eXpressApp Framework > Concepts > UI Construction > Using a Custom Control that is not Integrated by Default

Question Comments

Added By: MohammedFarooq at: 9/16/2015 5:14:32 AM    

Hi,

This is a good topic and I have planned to use it on my project. I would like to know how can i set the guage min & max values from the business object? Could you please advice me on how to set it up from the BO

Added By: Dennis (DevExpress Support) at: 9/16/2015 7:53:14 AM    @Mohammed: You can introduce your own code attributes and mark your business class properties with them to later read the attributes settings via the this.MemberInfo.FindAttribute<YourAttributeType> method within the PropertyEditor class context where you can adjust the gauge control accordingly.Added By: MohammedFarooq at: 9/29/2015 1:00:02 PM    

Dear Dennis,

I would appreciate if you can provide sample code in the context of below example as how i can implement it.


Viewing all articles
Browse latest Browse all 7205

Trending Articles