Comments (7)
I'm closing this as relevant changes have been revoked now. Feel free to reopen if there are more problems.
from fluenticons.
Hi,
This change is because that this class never implements border-related properties of TemplatedControl
(which is the base class of IconElement
), and BorderRenderHelper
from Avalonia is only visible internally. And the initial reason for this is to be aligned with other XAML frameworks.
Since Avalonia now features PathIcon
as the first official implementation of IconElement
, do you think it's better to implement border-related properties instead?
from fluenticons.
To be honest, I'm not sure what would be the better approach. It's just that I used IconElement for a lot of things and this update broke almost all my references in various view models. It's an easy fix to change all to Control but I thought it was nice to have the common base class IconElement to have a bit of a constraint (and semantic hint) what's to expect. For a minor version update I thought it was quite a breaking change.
I've seen that the Fluent Avalonia variant (derived from FAIconElement) is still using the IconElement inheritance chain. Really not sure what's the better apprach.
from fluenticons.
I've just revoked the base class change and implemented Background
, BorderBrush
, BorderThickness
, CornerRadius
and Padding
by hosting a Border
instance. Still, there is a sematic problem that this TemplatedControl
is not actually implemented by a ControlTemplate
.
from fluenticons.
Hmm, since you do the rendering directly in code, there's no need for a template, right? I'm also not completely sure if that's just a cosmetic issue or if has other implications.
from fluenticons.
Never tried this but Template
is exposed as a property, which seems weird for icon controls. I'm wondering why Avalonia chose so.
from fluenticons.
Because in Avalonia these are templated controls, which do not render themselves.
From PathIcon code: https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Themes.Fluent/Controls/PathIcon.xaml#L17-L25
from fluenticons.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluenticons.