Open Closed

How can I override the MainHeaderToolbarUserMenu in the Lepton X theme? #6310


User avatar
0
CoopMeisterFresh created
  • ABP Framework version: v7.4.2.
  • UI Type: Blazor Server.
  • Database System: EF Core (SQL Server).
  • Tiered (for MVC) or Auth Server Separated (for Angular): No.

I am trying to do something that seems incredibly simple in theory, but is proving to be monumentally hard when you're a complete noob :-P I just want to replace the user icon in the default MainHeaderToolbarUserMenu with my own icon, and figured the best way to do this would be to override the component entirely. This will also help in the future when we inevitably end up wanting to change other default aspects of the main header toolbar's UI.

So after downloading the Lepton X source code and reading a lot of ABP documentation, I have come up with this Razor component (can't add the code directly in here because your Markdown component keeps mangling it for some reason). However, this code results in the following problems:

  1. Visual Studio gives me a CS0234 error on line 7, saying that "The type or namespace name 'LeptonXTheme' does not exist in the namespace 'Volo.Abp.AspNetCore.Components.Web'", even after installing said package with abp add-package Volo.Abp.AspNetCore.Components.Web -p <name of my project file>.
  2. Visual Studio gives me RZ10012 warnings on lines 12, 13 and 64 because of the above.
  3. I get a whole lot of other errors that are probably just more consequences of the above "core" error.

What am I missing here?? I feel like I'm going absolutely bonkers since I basically just copied 99% of this code directly from the Lepton X source, yet it doesn't work for me! Any help would be very, very much appreciated :-D


1 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    May I ask, which icon you want to replace? There may be an easier way to do it.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09