.NET 學習

.NET 學習生活感想... 万事成蹉跎..... 贵在坚持 及时整理自己做过和学过的东西

博客园 首页 新随笔 联系 订阅 管理

 

using System;

using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Actions;
using DevExpress.ExpressApp.Model;

namespace XafExtendTest.Module
{
    
public partial class SwitchMasterDetailViewController : ViewController
    {
        
public SwitchMasterDetailViewController()
        {
            InitializeComponent();
            RegisterActions(components);
        }

        
private void simpleAction1_Execute(object sender, SimpleActionExecuteEventArgs e)
        {
            
if (((IModelListView)View.Model).MasterDetailMode == MasterDetailMode.ListViewAndDetailView)
                ((IModelListView)View.Model).MasterDetailMode 
=
                    DevExpress.ExpressApp.MasterDetailMode.ListViewOnly;
            
else
                ((IModelListView)View.Model).MasterDetailMode 
=
                    DevExpress.ExpressApp.MasterDetailMode.ListViewAndDetailView;
            View.SetInfo(View.Model);

        }
    }
}

 欢迎转载,转载请注明出处:http://www.cnblogs.com/Tonyyang/

 

posted on 2011-01-06 15:37  Tonyyang  阅读(497)  评论(0编辑  收藏  举报
欢迎转载,转载请注明出处:http://www.cnblogs.com/Tonyyang/