csharp #xaf #controller #ShowCustomStartupNavigationItemController
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了csharp #xaf #controller #ShowCustomStartupNavigationItemController相关的知识,希望对你有一定的参考价值。
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.SystemModule;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Patomorfologia.Module.Win.Controllers
{
public class ShowCustomStartupNavigationItemController : WindowController
{
private ShowNavigationItemController navigationController;
public ShowCustomStartupNavigationItemController()
{
TargetWindowType = WindowType.Main;
}
protected override void OnActivated()
{
base.OnActivated();
navigationController = Frame.GetController<ShowNavigationItemController>();
if (navigationController != null)
{
navigationController.CustomShowNavigationItem += OnCustomShowNavigationItem;
}
}
void OnCustomShowNavigationItem(object sender, CustomShowNavigationItemEventArgs e)
{
navigationController.CustomShowNavigationItem -= OnCustomShowNavigationItem;//It is important to unsubscribe from this event immediately.
ShowViewParameters svp = e.ActionArguments.ShowViewParameters;
IObjectSpace os = Application.CreateObjectSpace();
//object theObjectToBeShown = os.FindObject<Contact>(null);
//DetailView dv = Application.CreateDetailView(os, theObjectToBeShown, true);
//dv.ViewEditMode = DevExpress.ExpressApp.Editors.ViewEditMode.Edit;
var dv = Application.CreateDashboardView(os, "DashboardViewTechnik", true);
if (dv != null)
{
svp.CreatedView = dv;
e.Handled = true;
}
}
protected override void OnDeactivated()
{
navigationController.CustomShowNavigationItem -= OnCustomShowNavigationItem;
base.OnDeactivated();
}
}
}
以上是关于csharp #xaf #controller #ShowCustomStartupNavigationItemController的主要内容,如果未能解决你的问题,请参考以下文章
csharp #xaf #drawing
csharp #xaf #pictureedit #zooming
csharp #xaf #lisview #viewController
csharp FilteringCriterion #xaf
csharp CriteriaController #xaf
csharp filtrowanie po oddzialach #xaf