2017-07-06 21 views
1

我目前正在開發一個Xamarin.Forms應用程序。我正在使用IconizePlugin。該應用程序是基於tabbedPage和工具欄上我試圖包括一些操作的圖標。IconToolbarItem帶Iconize不點擊事件

這是whay我越來越: enter image description here

的圖標顯示良好,在Xamarin.iOS獲取點擊事件,但它不是在Xamarin.Droid工作。

我包括相應的nugets,並遵循文檔中告知的每個步驟,並且無法將其歸檔。 Droid中的其他圖標化控件工作正常,除了IconToolbarItem。

請幫忙!

回答

0

我發現的解決方法是在c#代碼中聲明de IconToolbarItem而不是xaml。雖然我不知道爲什麼它在xaml上無法正常工作。

申報的項目裏

ToolbarItems.Add(new IconToolbarItem 
{ 
     Icon = "fa-plus", 
     IconColor = Color.White, 
     Command = new Command(this.addBono) 
});