Current filter:
                                You should refresh the page.

                                1 Solution

                                Creation Date Importance Sort by
                                Hello Carl,

                                You can accomplish this task using one of the following approaches:
                                1. In versions 16.2+, handle the ActionBase.CustomizeControl event of the required action and set the MinimumSize property of the action's control:
                                using DevExpress.ExpressApp; using DevExpress.ExpressApp.Actions; using DevExpress.XtraEditors; namespace MainDemo.Module.Win { public class ViewController1 : ViewController<DetailView> { public ViewController1() { SimpleAction action = new SimpleAction(this, "MyAction12", "DetailViewActions"); action.CustomizeControl += Action_CustomizeControl; } private void Action_CustomizeControl(object sender, CustomizeControlEventArgs e) { SimpleButton button = e.Control as SimpleButton; if (button != null) { button.MinimumSize = new System.Drawing.Size(500, 0); } } } }

                                2. Define size constraints for the corresponding layout item. I have attached a video (video.swf) demonstrating how to do this in the Model Editor. Refer to the Custom Size Constraints topic for additional information.

                                3. Change the width of the underlying controls. Here is an example of how to change the width of the entire buttons control in WinForms:
                                using DevExpress.ExpressApp.Editors; using DevExpress.ExpressApp.Win.Templates.ActionContainers; public class ViewController1 : ViewController<DetailView> { protected override void OnActivated() { base.OnActivated(); foreach (WinActionContainerViewItem actionContainer in View.GetItems<WinActionContainerViewItem>()) { actionContainer.ControlCreated += actionContainer_ControlCreated; } } void actionContainer_ControlCreated(object sender, EventArgs e) { ((ButtonsContainer)((WinActionContainerViewItem)sender).Control).MinimumSize = new System.Drawing.Size(500, 0); } protected override void OnDeactivated() { base.OnDeactivated(); foreach (WinActionContainerViewItem actionContainer in View.GetItems<WinActionContainerViewItem>()) { actionContainer.ControlCreated -= actionContainer_ControlCreated; } } }
                                In addition, see how to change the width of individual buttons here: Customize ButtonSize for ActionViewController in DetailView. Refer to the Access Editor Settings topic for additional information.

                                If you need to increase the size of buttons shown in the PopupActions action container (e.g. OK and Cancel), you can customize the ButtonsContainer control returned by the PopupForm.ButtonsContainer property. Here is an example:
                                using DevExpress.ExpressApp.Win.Templates.ActionContainers; using DevExpress.ExpressApp.Win.Templates; public partial class ViewController1 : ViewController { public ViewController1() { PopupWindowShowAction action = new PopupWindowShowAction(this, "ShowPopup", DevExpress.Persistent.Base.PredefinedCategory.View); action.CustomizePopupWindowParams += action_CustomizePopupWindowParams; action.CustomizeTemplate += action_CustomizeTemplate; } void action_CustomizeTemplate(object sender, CustomizeTemplateEventArgs e) { if (e.Template is PopupForm) { ButtonsContainer popupActions = ((PopupForm)e.Template).ButtonsContainer; foreach (KeyValuePair<ActionBase, ButtonsContainersActionItemBase> item in popupActions.ActionItems) { if (item.Key.Id == "DialogOK" || item.Key.Id == "DialogCancel") { item.Value.Control.MinimumSize = new Size(200, 0); } } } } void action_CustomizePopupWindowParams(object sender, CustomizePopupWindowParamsEventArgs e) { IObjectSpace os = Application.CreateObjectSpace(typeof(DemoTask)); e.View = Application.CreateDetailView(os, os.CreateObject<DemoTask>()); } }

                                See Also
                                Web - How to customize ActionContainerViewItem's Action height and width
                                • Carl Howarth 1 04.19.2016
                                  Thanks Anatol,

                                  That looks like it is going to work exactly as expected!

                                  Many thanks,

                                • Anatol (DevExpress Support) 04.19.2016
                                  You are welcome!