Git Product home page Git Product logo

Comments (7)

thawatchai avatar thawatchai commented on August 18, 2024

👍 I agreed with @RefuX. The installation doc is great, but no simple how-to. I'm figuring out how to use this plugin now. Still, I couldn't find a way to use it yet. 😢

from xamarin.plugins.

thawatchai avatar thawatchai commented on August 18, 2024

Ok, it turned out that I haven't looked hard enough. We can use this plugin by interpolating the icon name in string (like "{fa-user} User"), but I still can't make it to change to the icon yet.

from xamarin.plugins.

L4rS6 avatar L4rS6 commented on August 18, 2024

Just bind a string property to your button e.g.:
<iconize:IconButton Text="{Binding MyIcon}" />

And the property should look like this:

private string _myIcon;
public string MyIcon
        {
            get
            {
                return _myIcon;
            }
            set
            {
                _myIcon = value;
                FirePropertyChanged();
            }
        }

And there was an import change by version 1.0.6: You can't use Icon names like this: {fa-navicon} instead you have to use now: fa-navicon

from xamarin.plugins.

thawatchai avatar thawatchai commented on August 18, 2024

Thanks, @L4rS6. I think I'll wait for the document.

(I've just started using Xamarin.Forms this week, still in the beginning of the learning curve. I hope I can contribute to the community when I'm more familiar with the tools.)

from xamarin.plugins.

thawatchai avatar thawatchai commented on August 18, 2024

I've just installed this plugin again and it works great! Thanks for this wonderful plugin.

The trick is to follow the installation instruction carefully, then use the provided custom controls with the Text property as the icon name (in case of IconLabel). For example, <iconize:IconLabel Text="fa-users" />. Other controls might use different properties.

Don't forget to add the namespace in the beginning of the XAML file, too.
xmlns:iconize="clr-namespace:FormsPlugin.Iconize;assembly=FormsPlugin.Iconize"

from xamarin.plugins.

killer-frog avatar killer-frog commented on August 18, 2024

Tried to add this to my xamarin forms project, works like a charm on IOS but when I try to add the INIT command to the MainActivity I get the error:

The name `MaterialIconControls' does not exist in the current context

The MaterialIconControls exists in the IOS implementation but does not seem to in the Driod (I Tried adding

using MaterialIcons.FormsPlugin.Droid;

manually but it still can't resolve the namespace (although it does suggest adding a using to the IOS version to fix this which must be wrong)

from xamarin.plugins.

jsmarcus avatar jsmarcus commented on August 18, 2024

@asj-it use Iconize and not MaterialIcons

from xamarin.plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.