Skip to content
This repository was archived by the owner on Jan 8, 2019. It is now read-only.

IconToolbarItem does not work correctly in a TabbedPage #24

Open
azuken opened this issue Sep 8, 2016 · 6 comments
Open

IconToolbarItem does not work correctly in a TabbedPage #24

azuken opened this issue Sep 8, 2016 · 6 comments

Comments

@azuken
Copy link

azuken commented Sep 8, 2016

Hi,

It seems that if we use IconToolbarItem in a TabbedPage (and not in a ContentPage), icons aren't showing up, but Command action works, and we can see "tap effect" on icons places. In a ContentPage, IconToolbarItem works.
Here is a sample of my code :

  <TabbedPage.ToolbarItems>
    <iconize:IconToolbarItem Icon="fa-map" IconColor="#CBCBCB" Command="{Binding Action1}" />
    <iconize:IconToolbarItem Icon="fa-calendar" IconColor="#CBCBCB" Command="{Binding Action2}" />
  </TabbedPage.ToolbarItems>

Is this a known issue ?

@jsmarcus
Copy link
Owner

jsmarcus commented Sep 8, 2016

Are you using an IconTabbedPage? The sample uses one and the toolbar icons were working alright.

@azuken
Copy link
Author

azuken commented Sep 9, 2016

I tried with IconTabbedPage, and it changes nothing, icons won't show.

Here is my full code sample:

<?xml version="1.0" encoding="utf-8" ?>
<iconize:IconTabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
            xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
            xmlns:iconize="clr-namespace:FormsPlugin.Iconize;assembly=FormsPlugin.Iconize"
            x:Class="SamplePage"
            Title="{Binding Title}">
  <iconize:IconTabbedPage.ToolbarItems>
    <iconize:IconToolbarItem Icon="fa-map" IconColor="#CBCBCB" Command="{Binding Action1}" />
    <iconize:IconToolbarItem Icon="fa-calendar" IconColor="#CBCBCB" Command="{Binding Action2}" />
  </iconize:IconTabbedPage.ToolbarItems>
  <iconize:IconTabbedPage.Children>
{...}
  </iconize:IconTabbedPage.Children>
</iconize:IconTabbedPage>

I searched in your GitHub Forms samples, but I found nothing like my case.

@thechrisde
Copy link

Currently the Sample from the Github is also not working. Atleast in my case.

@ljezny
Copy link

ljezny commented Sep 26, 2016

I have the same problem.

@tyjen
Copy link

tyjen commented Nov 23, 2016

I'm also having issues with IconToolbarItems showing up correctly. I'm getting the following exception on Android, while in iOS it simply doesn't show up:

System.InvalidCastException: Unable to convert instance of type 'Android.Support.V7.Widget.AppCompatTextView' to type 'Android.Support.V7.Widget.Toolbar'.

@BenDevelopment
Copy link

I'm facing a problem with the same case but not the same error message:
System.NullReferenceException: Object reference not set to an instance of an object.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants