skproch / material.icons Goto Github PK
View Code? Open in Web Editor NEWStrongly typed parsed icons set from materialdesignicons.com and display control implementations for different GUI frameworks.
License: MIT License
Strongly typed parsed icons set from materialdesignicons.com and display control implementations for different GUI frameworks.
License: MIT License
The current default style for the <wpf:MaterialIcon />
has a hard coded width and height of 16
pixels.
It would be better if the default Width
and/or Height
where actually Double.NaN
. That way, the icons will scale to whatever the parent control allows, and if I want to restrict it further, I can just set either Width
or (more realistically) Height
to whatever makes sense for that usage.
For reference, this is the style I apply globally in my apps to work around this:
<Style TargetType="{x:Type wpf:MaterialIcon}" >
<Setter Property="Height" Value="NaN" />
<Setter Property="Width" Value="NaN" />
</Style>
Hello, is it possible to add custom icons?
I have some SVG files that I would like to integrate in Material.Icons so I can use the same API for Material Icons and Custom Icons.
Thanks
Exception has occurred: CLR/System.MissingMethodException
Exception thrown: 'System.MissingMethodException' in OpenTabletDriver.UI.Library.dll: 'Method not found: 'Boolean Avalonia.AvaloniaObject.SetAndRaise(Avalonia.AvaloniaProperty`1<!!0>, !!0 ByRef, !!0)'.'
at Material.Icons.Avalonia.MaterialIcon.set_Kind(MaterialIconKind value)
at OpenTabletDriver.UI.Views.MainWindowView.!XamlIlPopulate(IServiceProvider , MainWindowView ) in C:\Users\Oscar\projects\OpenTabletDriver\OpenTabletDriver.UI.Library\Views/MainWindowView.axaml:line 54
<materialIcons:MaterialIcon Kind="ArrowLeft"
Margin="20, 0"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
Nice library. I've noticed that a fair amount of the icons are missing e.g. Dashboard. Is it worth bumping the NuGet version with a rebuild to automatically generate the newer icons?
How can I set the size of the icon when using it this way?
<materialIcons:MaterialIcon Kind="Abacus" />
I don't see Size
attribute, while it is available in the "extension":
<Button Content="{materialIcons:MaterialIconExt Kind=Abacus, **Size=30**}" />
I dont know how to make a pull request. I alredy done. Project is atached
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="ViMultiSync.App"
xmlns:local="using:ViMultiSync"
xmlns:viMultiSync="clr-namespace:ViMultiSync"
xmlns:views="clr-namespace:ViMultiSync.Views"
xmlns:viewModels="clr-namespace:ViMultiSync.ViewModels"
xmlns:material="using:Material.Icons.Avalonia"
RequestedThemeVariant="Default">
<Application.DataTemplates>
<viMultiSync:ViewLocator/>
</Application.DataTemplates>
<Application.Styles>
<FluentTheme />
<StyleInclude Source="Styles/AnimatedPopup.axaml"/>
<StyleInclude Source="Styles/Button/PopupButton.axaml"/>
<StyleInclude Source="Styles/Keyboard.axaml"/>
<StyleInclude Source="avares://Material.Icons.Avalonia/App.xaml" />
</Application.Styles>
</Application>
Exception : Avalonia.Markup.Xaml.XamlLoadException: 'No precompiled XAML found for materialicons:MaterialIconStyles (baseUri: avares://ViMultiSync/App.axaml), make sure to specify x:Class and include your XAML file as AvaloniaResource'
your Material.Icon works with Avalonia 11.0.5?
Using <materialIcons:MaterialIcon Kind="Folder" />
gives me this warning, but I'm able to use the icon.
Though using <Button Content="{materialIcons:MaterialIconExt Kind=Folder}" />
does not work at all, even after cleaning and building the solution. Saying the name "MaterialIconExt" does not exist.
Wondering if you plan on introducing a Winui 3 set?
Would be very welcome
Is there a way to add an outline (or "border") to the icon?
I upgraded to Avalonia 11.0.0 official version and the loading started with an error:
Avalonia.Markup.Xaml.XamlLoadException:“No precompiled XAML found for avares://Material.Icons.Avalonia/App.xaml (baseUri: avares://AvaloniaApplication1/App.axaml), make sure to specify x:Class and include your XAML file as AvaloniaResource”
Hi :),
Is it possible to strong sign the assemblies in this package?
I am developing a system that depends on strong signed assemblies so I needed this one to be also in order to use it :(.
Thanks in advance and best regards
POFerro
There is no Avalonia package available for the newest version (2.1.8). If I now use the Material.Icons package at some project (because of the ItemKind enum) and Material.Icons.Avalonia at some other project (latest version 2.1.0) then the enum values are wrong and the wrong icons are displayed. Additionally the newest icons can not be used with Material.Icons.Avalonia.
As is:
Expected (if I change the Material.Icons back to 2.1.0):
Solution would probably be to increase version number for the other projecs as well.
This error crashes JetBrains Rider Avalonia previewer.
Rider:
JetBrains Rider 2023.3.4
Build #RD-233.14475.66, built on March 6, 2024
Runtime version: 17.0.10+1-b1087.17 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11.
avalonia-rider (1.3.0)
<PackageReference Include="Material.Icons.Avalonia" Version="2.1.9" />
2024-04-12 17:17:18,850 [ 19198] WARN - #me.fornever.avaloniarider.idea.editor.BitmapPreviewEditorComponent - XAML update error: XamlParseException at 29:26: Unable to resolve type MaterialIcon from namespace clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia Line 29, position 26.
XamlX.XamlParseException: Unable to resolve type MaterialIcon from namespace clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia Line 29, position 26.
at XamlX.Transform.Transformers.TypeReferenceResolver.ResolveTypeCore(AstTransformationContext context, String xmlns, String name, Boolean isMarkupExtension, List`1 typeArguments, IXamlLineInfo lineInfo, Boolean strict)
at XamlX.Transform.Transformers.TypeReferenceResolver.ResolveType(AstTransformationContext context, String xmlns, String name, Boolean isMarkupExtension, List`1 typeArguments, IXamlLineInfo lineInfo, Boolean strict)
at XamlX.Transform.Transformers.TypeReferenceResolver.ResolveType(AstTransformationContext context, XamlAstXmlTypeReference xmlref, Boolean strict)
at XamlX.Transform.Transformers.TypeReferenceResolver.Transform(AstTransformationContext context, IXamlAstNode node)
at XamlX.Transform.AstTransformationContext.Visitor.Visit(IXamlAstNode node)
at XamlX.Ast.XamlAstNode.Visit(IXamlAstVisitor visitor)
at XamlX.Ast.XamlAstObjectNode.VisitChildren(IXamlAstVisitor visitor)
at XamlX.Ast.XamlAstNode.Visit(IXamlAstVisitor visitor)
at XamlX.Ast.XamlAstNode.VisitList[T](IList`1 list, IXamlAstVisitor visitor)
at XamlX.Ast.XamlAstObjectNode.VisitChildren(IXamlAstVisitor visitor)
at XamlX.Ast.XamlAstNode.Visit(IXamlAstVisitor visitor)
at XamlX.Ast.XamlAstNode.VisitList[T](IList`1 list, IXamlAstVisitor visitor)
at XamlX.Ast.XamlAstObjectNode.VisitChildren(IXamlAstVisitor visitor)
at XamlX.Ast.XamlAstNode.Visit(IXamlAstVisitor visitor)
at XamlX.Ast.XamlAstNode.VisitList[T](IList`1 list, IXamlAstVisitor visitor)
at XamlX.Ast.XamlAstXamlPropertyValueNode.VisitChildren(IXamlAstVisitor visitor)
at XamlX.Ast.XamlAstNode.Visit(IXamlAstVisitor visitor)
at XamlX.Ast.XamlAstNode.VisitList[T](IList`1 list, IXamlAstVisitor visitor)
at XamlX.Ast.XamlAstObjectNode.VisitChildren(IXamlAstVisitor visitor)
at XamlX.Ast.XamlAstNode.Visit(IXamlAstVisitor visitor)
at XamlX.Ast.XamlAstNode.VisitList[T](IList`1 list, IXamlAstVisitor visitor)
at XamlX.Ast.XamlAstObjectNode.VisitChildren(IXamlAstVisitor visitor)
at XamlX.Ast.XamlAstNode.Visit(IXamlAstVisitor visitor)
at XamlX.Ast.XamlAstNode.VisitList[T](IList`1 list, IXamlAstVisitor visitor)
at XamlX.Ast.XamlAstObjectNode.VisitChildren(IXamlAstVisitor visitor)
at XamlX.Ast.XamlAstNode.Visit(IXamlAstVisitor visitor)
at XamlX.Transform.AstTransformationContext.Visit(IXamlAstNode root, IXamlAstTransformer transformer)
at XamlX.Compiler.XamlCompiler`2.Transform(XamlDocument doc, Boolean strict)
at Avalonia.Markup.Xaml.XamlIl.AvaloniaXamlIlRuntimeCompiler.LoadGroupSreCore(IReadOnlyCollection`1 documents, RuntimeXamlLoaderConfiguration configuration)
at Avalonia.Markup.Xaml.XamlIl.AvaloniaXamlIlRuntimeCompiler.LoadSreCore(RuntimeXamlLoaderDocument document, RuntimeXamlLoaderConfiguration configuration)
at Avalonia.Markup.Xaml.XamlIl.AvaloniaXamlIlRuntimeCompiler.LoadSre(RuntimeXamlLoaderDocument document, RuntimeXamlLoaderConfiguration configuration)
at Avalonia.Markup.Xaml.XamlIl.AvaloniaXamlIlRuntimeCompiler.Load(RuntimeXamlLoaderDocument document, RuntimeXamlLoaderConfiguration configuration)
at Avalonia.Designer.HostApp.DesignXamlLoader.Load(RuntimeXamlLoaderDocument document, RuntimeXamlLoaderConfiguration configuration)
at Avalonia.DesignerSupport.DesignWindowLoader.LoadDesignerWindow(String xaml, String assemblyPath, String xamlFileProjectPath, Double renderScaling)
at Avalonia.DesignerSupport.Remote.RemoteDesignerEntryPoint.<>c__DisplayClass18_0.<OnTransportMessage>b__0()
No idea whether this is library related or a bug with Avalonia itself. I have previously made an issue on Avalonia preview repo, but they directed me towards Avalonia themselves or the library (Material.Icons.Avalonia)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.