0
我正在使用uCommerce,我想刪除現有選項卡上的添加按鈕之一。如何刪除uCommerce中選項卡上的現有按鈕?
我跟着這個刪除按鈕部分上this文章
一切工作正常,但我不知道什麼是RemoveMenuButtion()方法中imageButtom。
這裏是我的代碼 -
public PipelineExecutionResult Execute(SectionGroup subject)
{
if (subject.GetViewName() != Constants.UI.Pages.Orders.Order)
return PipelineExecutionResult.Success;
var section = subject.Sections.FirstOrDefault(s => s.OriginalName == Constants.UI.Sections.Orders.Order.Shipping);
if (section == null) return PipelineExecutionResult.Success;
var imageButton = new ImageButton { ImageUrl = $"{_pathService.GetPath()}/images/ui/add.png"};
section.Menu.RemoveMenuButtion(imageButton);
return PipelineExecutionResult.Success;
}
我認爲這個問題是這裏 -
var imageButton = new ImageButton { ImageUrl = $"{_pathService.GetPath()}/images/ui/add.png"};
但不能肯定,因爲沒有什麼具體的文檔上雖然。
任何幫助,高度讚賞。
謝謝