Seems Icons not available in other themes

  1. #1

    Seems Icons not available in other themes

    I use gray theme in 7.2, and seems icons not available in gray theme.
    Should I add another lib or something?
  2. #2
    Hello @mehdy!

    The Gray theme icons should be available in the gray theme. But they are used a bit differently in Ext.NET 7. If you show a simple scenario in v5- where you use a icon that you want to replicate in v7, we can show you how to do it.

    Basically you'd be using iconCls with a reference to the icon, instead of just Icon="Add" in previous versions. As it was a complete rewrite of the Ext.NET engine to .NET Core (.NET 5), we simply couldn't implement some syntax sugar previous versions uses for that and other features. Besides, the newer themes (Spotless, Material, Triton, Graphite, Aria) uses font icons, so these "old themes" icons can't be automatically mapped between the themes.

    But again, the old themes are still there, and their icons too. Just tell us what your scenario is and we'll tell you what to do. Then you probably will be able to expand the usage to other components where you use them.

    Looking forward to your follow-up!
    Fabrício Murta
    Developer & Support Expert
  3. #3
    This is old syntax :
    X.ITLButton().Icon(Icon.PageExcel) // PageExcel == 1149
    This is new which not working in gray theme:
    X.ITLButton().IconCls("x-md md-icon-lock")
  4. #4
    Hello @mehdy!

    Sorry, I provided you wrong information in the last post. In fact, Ext.NET 7 does not support the famfamfam icon set as previous Ext.NET versions did.

    This was stated by Ext.NET's CEO in a related GitHub issue and I only found that while reviewing the code to make icons show.

    Although not supported, the famfamfam icon set is still available for free download and you can just download and use it an it should look just like old Ext.NET did in the old themes, where the icon set fit perfectly!

    Hope this helps!
    Fabrício Murta
    Developer & Support Expert
  5. #5
    And, in case you're not happy with the news, I've just written a guide on how to set up famfamfam icons back to Ext.NET 7!

    Take a look, any feedback is appreciated: [guide] How to enable old FamFamFam icons in new Ext.NET 7 Classic

    It is not that difficult, and I went a bit verbose to help with most cases, hopefully fulfilling yours and many others' requirements to mesh up icons with the old Ext.NET themes.

    Hope this helps!
    Fabrício Murta
    Developer & Support Expert
  6. #6
    That's awesome, thank you.

    I hoped there is way to add font icons, Is there any way that we can add font icons too? (Like spotless theme)
  7. #7
    Hello again, @mehdy!

    For that, we don't even need a guide! @Z was able in this 4.x thread, using iconCls, to use the Awesome fonts in the Gray theme. A similar approach will do for the material one.

    - Fonts Awesome in Gray Theme

    The steps are also similar to the guide to famfamfam -- except now you're installing a font file instead of 1,000 pngs -- and the CSS is already provided by the icon font package.

    Hope this helps!
    Fabrício Murta
    Developer & Support Expert
  8. #8
    Oh, and this v5 example wraps up the awesome font whenever the theme does not include it, so it might be interesting to investigate:

    - Tree Panel > List > Overview
    Fabrício Murta
    Developer & Support Expert
  9. #9
    Thanks, really helpful
  10. #10
    Glad it helped, and thanks for the feedback!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Themes
    By khalidal in forum 2.x Help
    Replies: 1
    Last Post: Apr 14, 2014, 10:05 PM
  2. What about new Themes?
    By Tanielian in forum 1.x Help
    Replies: 2
    Last Post: Sep 03, 2010, 6:42 PM
  3. about themes
    By kiran malgi in forum 1.x Help
    Replies: 2
    Last Post: Mar 06, 2010, 12:35 AM
  4. [CLOSED] Icons not showing up w/ASP.NET Themes
    By randy85253 in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Apr 20, 2009, 2:08 AM
  5. Replies: 0
    Last Post: Apr 03, 2009, 5:47 AM

Tags for this Thread

Posting Permissions