public void SetView(DevExpress.ExpressApp.View view) { this.ViewSite.Controls.Clear(); if (view != null) { contextMenu.CreateControls(view); view.CreateControls(); ViewSite.Controls.Add((Control)view.Control); this.ViewCaptionLabel.Text = view.Caption; Header.Title = view.Caption + " - " + WebApplication.Instance.Title; ImageInfo imageInfo = ImageLoader.Instance.GetLargeImageInfo(ViewImageNameHelper.GetImageName(view)); if (imageInfo.IsEmpty) { ViewImage.Visible = false; } else { ViewImage.ImageUrl = imageInfo.ImageUrl; } if (view is DetailView) { //SearchActionContainer.Visible = false; //ObjectsCreationActionContainer.Visible = false; } } }
public void SetView(DevExpress.ExpressApp.View view) { ViewSite.Controls.Clear(); if (view != null) { contextMenu.CreateControls(view); view.CreateControls(); if (ViewControlAdding != null) { ViewControlAdding(this, EventArgs.Empty); } ViewSite.Controls.Add((Control)view.Control); ViewCaptionLabel.Text = view.Caption; ImageInfo imageInfo = ImageLoader.Instance.GetLargeImageInfo(ViewImageNameHelper.GetImageName(view)); if (imageInfo.IsEmpty) { ViewImage.Visible = false; } else { ViewImage.ImageUrl = imageInfo.ImageUrl; } } }
private void layoutView_CustomCardCaptionImage(object sender, DevExpress.XtraGrid.Views.Layout.Events.LayoutViewCardCaptionImageEventArgs e) { e.CaptionImageLocation = GroupElementLocation.BeforeText; e.Image = ImageLoader.Instance.GetImageInfo(ViewImageNameHelper.GetImageName(Model)).Image; }