Skip to content

Commit 41e70cc

Browse files
update readme (#6)
1 parent 9dbebbd commit 41e70cc

File tree

1 file changed

+37
-32
lines changed

1 file changed

+37
-32
lines changed

Readme.md

Lines changed: 37 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,40 @@
1-
<!-- default badges list -->
2-
![](https://img.shields.io/endpoint?url=https://codecentral.devexpress.com/api/v1/VersionRange/128587345/22.2.6%2B)
3-
[![](https://img.shields.io/badge/Open_in_DevExpress_Support_Center-FF7200?style=flat-square&logo=DevExpress&logoColor=white)](https://supportcenter.devexpress.com/ticket/details/T137443)
4-
[![](https://img.shields.io/badge/📖_How_to_use_DevExpress_Examples-e9f6fc?style=flat-square)](https://docs.devexpress.com/GeneralInformation/403183)
5-
[![](https://img.shields.io/badge/💬_Leave_Feedback-feecdd?style=flat-square)](#does-this-example-address-your-development-requirementsobjectives)
6-
<!-- default badges end -->
7-
# XAF - Add a Custom Button to a Form (WinForms)
8-
9-
This example demonstrates how to add a custom control to a Detail View. If you want to display standard [XAF Actions](https://docs.devexpress.com/eXpressAppFramework/112622/ui-construction/controllers-and-actions/actions) in a Detail View, use the technique described in the following topic: [How to: Include an Action to a Detail View Layout](https://docs.devexpress.com/eXpressAppFramework/112816/ui-construction/view-items-and-property-editors/how-to-include-an-action-to-a-detail-view-layout).
10-
11-
See the following help topic for more information: [How to: Use a Custom View Item to Add a Button to a Detail View](https://docs.devexpress.com/eXpressAppFramework/113653/ui-construction/view-items-and-property-editors/how-to-add-a-button-to-a-detail-view-using-custom-view-item).
12-
![image](https://github.com/DevExpress-Examples/XAF_how-to-add-a-button-to-a-form-using-custom-view-item-t137443/assets/14300209/570d1aaf-5066-43d9-ae12-bc1dd7134e4d)
13-
14-
<!-- default file list -->
15-
*Files to look at*:
16-
* [ButtonDetailViewItemWin.cs](CS/EFCore/ButtonInFormEF/ButtonInFormEF.Win/ButtonDetailViewItemWin.cs)
17-
* [Model.xafml](CS/EFCore/ButtonInFormEF/ButtonInFormEF.Win/Model.xafml)
18-
<!-- default file list end -->
19-
20-
## Documentation
21-
* [Using a Custom Control that is not Integrated by Default](https://docs.devexpress.com/eXpressAppFramework/113610/ui-construction/using-a-custom-control-that-is-not-integrated-by-default/using-a-custom-control-that-is-not-integrated-by-default)
22-
* [How to: Create a Custom Control Detail Item](https://docs.devexpress.com/eXpressAppFramework/113652/ui-construction/view-items-and-property-editors/how-to-create-a-custom-control-detail-item)
23-
* [How to: Implement a View Item](https://docs.devexpress.com/eXpressAppFramework/112641/ui-construction/view-items-and-property-editors/how-to-implement-a-view-item)
24-
25-
## More Examples
26-
* [How to: Use a Custom View Item to Add a Button to a Detail View (Blazor)](https://github.com/DevExpress-Examples/xaf-custom-view-item-blazor)
27-
* [How to: Create a Custom Control Detail Item (WinForms and ASP.NET WebForms)](https://github.com/DevExpress-Examples/XAF_how-to-create-a-custom-control-detail-item-t137193)
28-
* [XAF - Add a Custom Button to a Form (ASP.NET WebForms)](https://github.com/DevExpress-Examples/XAF_how-to-add-a-button-to-a-form-using-custom-view-item-t137443/tree/17.2.3+)
29-
<!-- feedback -->
1+
<!-- default badges list -->
2+
[![](https://img.shields.io/badge/Open_in_DevExpress_Support_Center-FF7200?style=flat-square&logo=DevExpress&logoColor=white)](https://supportcenter.devexpress.com/ticket/details/T137443)
3+
[![](https://img.shields.io/badge/📖_How_to_use_DevExpress_Examples-e9f6fc?style=flat-square)](https://docs.devexpress.com/GeneralInformation/403183)
4+
[![](https://img.shields.io/badge/💬_Leave_Feedback-feecdd?style=flat-square)](#does-this-example-address-your-development-requirementsobjectives)
5+
<!-- default badges end -->
6+
# XAF WinForms - Add an Unbound Control (Button) to the Form Layout in an XAF View (with a Fully Custom ViewItem)
7+
8+
This example adds a custom control to a Detail View. See the following help topic for more information: [How to Add an Unbound Control (Button) to the Form Layout in an XAF View (with a Fully Custom ViewItem)](https://docs.devexpress.com/eXpressAppFramework/113653/ui-construction/view-items-and-property-editors/how-to-add-a-button-to-a-detail-view-using-custom-view-item).
9+
10+
![custom-button-in-form](https://github.com/user-attachments/assets/9f66a6f3-5471-4ad4-bbd3-8e098f16591e)
11+
12+
## Implementation Considerations
13+
14+
This is an advanced customization method that requires coding. Use it when you want to add an existing or custom control to the client area of a Detail View or Dashboard View. This approach allows you to obtain data from the current View object, if necessary. Your control can be unbound or can load data from external sources.
15+
16+
If you want to bind a control to a business class property and add that control to both List View and Detail View, consider the [custom Property Editor approach](https://docs.devexpress.com/eXpressAppFramework/113097/ui-construction/view-items-and-property-editors/property-editors#custom-property-editors).
17+
18+
This approach does not impose any restrictions on UI Control and XAF View interaction. You can implement custom logic in a `ViewController` or a custom UI control. [ViewItem](https://docs.devexpress.com/eXpressAppFramework/DevExpress.ExpressApp.Editors.ViewItem) descendants may implement their own inner logic.
19+
20+
To display standard [XAF Actions](https://docs.devexpress.com/eXpressAppFramework/112622/ui-construction/controllers-and-actions/actions) in a Detail View, use the technique described in the following topic: [How to: Include an Action to a Detail View Layout](https://docs.devexpress.com/eXpressAppFramework/112816/ui-construction/view-items-and-property-editors/how-to-include-an-action-to-a-detail-view-layout).
21+
22+
## Files to Review
23+
* [ButtonDetailViewItemWin.cs](CS/EFCore/ButtonInFormEF/ButtonInFormEF.Win/ButtonDetailViewItemWin.cs)
24+
* [Model.xafml](CS/EFCore/ButtonInFormEF/ButtonInFormEF.Win/Model.xafml)
25+
26+
## Documentation
27+
* [How to Add an Unbound Control (Button) to the Form Layout in an XAF View (with a Built-in ActionContainerViewItem)](https://docs.devexpress.com/eXpressAppFramework/112816/ui-construction/view-items-and-property-editors/include-an-action-to-a-detail-view-layout)
28+
* [How to Add an Unbound Control (Button) to the Form Layout in an XAF View (with a Built-in ControlViewItem)](https://docs.devexpress.com/eXpressAppFramework/113652/ui-construction/view-items-and-property-editors/how-to-create-a-custom-control-detail-item)
29+
* [How to: Include a Custom UI Control That Is Not Integrated by Default (WinForms, ASP.NET Web Forms, and ASP.NET Core Blazor)](https://docs.devexpress.com/eXpressAppFramework/113610/ui-construction/using-a-custom-control-that-is-not-integrated-by-default/using-a-custom-control-that-is-not-integrated-by-default)
30+
31+
## More Examples
32+
* [How to: Use a Custom View Item to Add a Button to a Detail View (Blazor)](https://github.com/DevExpress-Examples/xaf-custom-view-item-blazor)
33+
* [XAF - Add a Custom Button to a Form (ASP.NET WebForms)](https://github.com/DevExpress-Examples/XAF_how-to-add-a-button-to-a-form-using-custom-view-item-t137443/tree/17.2.3+)
34+
<!-- feedback -->
3035
## Does this example address your development requirements/objectives?
3136

32-
[<img src="https://www.devexpress.com/support/examples/i/yes-button.svg"/>](https://www.devexpress.com/support/examples/survey.xml?utm_source=github&utm_campaign=XAF_how-to-add-a-button-to-a-form-using-custom-view-item-t137443&~~~was_helpful=yes) [<img src="https://www.devexpress.com/support/examples/i/no-button.svg"/>](https://www.devexpress.com/support/examples/survey.xml?utm_source=github&utm_campaign=XAF_how-to-add-a-button-to-a-form-using-custom-view-item-t137443&~~~was_helpful=no)
37+
[<img src="https://www.devexpress.com/support/examples/i/yes-button.svg"/>](https://www.devexpress.com/support/examples/survey.xml?utm_source=github&utm_campaign=xaf-win-add-custom-button-to-form-using-custom-view-item&~~~was_helpful=yes) [<img src="https://www.devexpress.com/support/examples/i/no-button.svg"/>](https://www.devexpress.com/support/examples/survey.xml?utm_source=github&utm_campaign=xaf-win-add-custom-button-to-form-using-custom-view-item&~~~was_helpful=no)
3338

34-
(you will be redirected to DevExpress.com to submit your response)
35-
<!-- feedback end -->
39+
(you will be redirected to DevExpress.com to submit your response)
40+
<!-- feedback end -->

0 commit comments

Comments
 (0)