Code Monkey home page Code Monkey logo

Comments (5)

vnbaaij avatar vnbaaij commented on September 26, 2024 1

Ok, the issue is that you have not specified an Intent of the MessageBar in the options.

It will go through this code

 return Content.Intent switch
                {
                    MessageIntent.Info => new CoreIcons.Filled.Size20.Info(),
                    MessageIntent.Warning => new CoreIcons.Filled.Size20.Warning(),
                    MessageIntent.Error => new CoreIcons.Filled.Size20.DismissCircle(),
                    MessageIntent.Success => new CoreIcons.Filled.Size20.CheckmarkCircle(),
                    _ => null,
                };

In your case it returns null and that is what gives you the error.

So 'workaround' is for now to supply an Intent (of type Messageintent) in the options.

I'll implement a default (MessageIntent.Info) for this for the next trelease.

from fluentui-blazor.

oneolddev avatar oneolddev commented on September 26, 2024

@verdie-g

Did you add the icons package as per https://www.fluentui-blazor.net/IconsAndEmoji?

dotnet add package FluentUI.AspNetCore.Components.Icons

from fluentui-blazor.

vnbaaij avatar vnbaaij commented on September 26, 2024

Is this happening in a published application? If so, it is probably the trimmer being to aggressive. Try with adding to your project file:
<ItemGroup> <TrimmerRootAssembly Include="Microsoft.FluentUI.AspNetCore.Components" /> </ItemGroup>

from fluentui-blazor.

verdie-g avatar verdie-g commented on September 26, 2024

I could reproduce in a minimal application:

  1. dotnet new fluentblazorwasm -n FluentBlazorTest
  2. replace the Home.razor with the snippet of my first message
  3. run the app in debug mode

Did you add the icons package as per https://www.fluentui-blazor.net/IconsAndEmoji?

I confirm that this package is included in the template

Is this happening in a published application?

and that I've not published the app but just ran it from my IDE.

from fluentui-blazor.

vnbaaij avatar vnbaaij commented on September 26, 2024

Ok, with these settings your home page is using SSR. Maybe that is it. Never mind, it's wasm...

Will take a look later

from fluentui-blazor.

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.