Comments (5)
The first thing is when the label is displayed to the right, the text is off-centered of the icon, as you can see below:
Sometimes sizes/margins/paddings don't port very nicely. I had to make the Viewbox holding the icon in the template bigger so it better matches WinUI (it's 16px in WinUI, I bumped to 20px, as it was too small, but I don't know why) adjusting that makes the margins wrong and pushes the icon too far down. This is a simple fix. The other thing, which I don't think is the primary issue here, and is where taking WinUI cross platform has issues, is the margins applied to TextBlocks in many WinUI templates are based on the Segoe UI font, which doesn't necessarily exist outside of Windows, and other fonts don't always align the same. So it may not be 100% possible to perfectly align
Regarding this, ^, is there a
DynamicResource
brush or something I can set for the background that would match the same brush used as the background of theNavigationView
andMenuBar
?
The NavigationView
pane and MenuBar
are transparent by default (that's just what MS decided) so the darker color is the default Window/page color, which I believe is SolidBackgroundFillColorBaseBrush
All colors & brushes are here for v2 styles (the resource keys are the same for dark theme):
https://github.com/amwx/FluentAvalonia/blob/master/FluentAvalonia/Styling/StylesV2/LightResources.axaml
from fluentavalonia.
The other thing, which I don't think is the primary issue here, and is where taking WinUI cross platform has issues, is the margins applied to TextBlocks in many WinUI templates are based on the Segoe UI font, which doesn't necessarily exist outside of Windows, and other fonts don't always align the same. So it may not be 100% possible to perfectly align.
Would we be able to add SegoeUI Font file to the framework or something and use it in the styles?
The
NavigationView
pane andMenuBar
are transparent by default (that's just what MS decided) so the darker color is the default Window/page color, which I believe isSolidBackgroundFillColorBaseBrush
That was it! Thanks :)
from fluentavalonia.
@amwx I changed the background to match however I'm experiencing another issue:
Notice how when I click ...
to display the secondary commands, the background becomes transparent on the command bar. When I close the secondary commands, it goes back to what i set it to.
from fluentavalonia.
When the CommandBar
IsOpen=true
, the background is changed (it also adds a border), which was added as part of the v2 Fluent styles, e.g., in WinUI XamlControlsGallery:
To not do this, you'll have to override this Style Selector to set the background to whatever (replace CommandBarBackgroundOpen
with the resource you want.
FluentAvalonia/FluentAvalonia/Styling/Controls/CommandBar/CommandBar.axaml
Lines 271 to 275 in 7e508a3
from fluentavalonia.
That worked! Thanks for all the help again :)
from fluentavalonia.
Related Issues (20)
- TabView border disappears when there is a single tab only HOT 7
- Button area overflows the window in a wide TaskDialog HOT 1
- Issue running latest sample HOT 3
- MacOS titlebar has a space ontop of content window HOT 4
- Provide ProgressRing and RadialProgressBar control HOT 4
- NavigationView / ItemsRepeater Crash with FluentAvalonia 2.1.0-preview4 HOT 6
- 'Command bar' crashes on resizing the window after opening the overflow menu
- NumberBox crashes if there is a bindings to the ViewModel HOT 3
- StackOverflow exception in RangeSlider
- Support Bottom NavigationView HOT 4
- Exception when trying to remove selected item in NavigationView 2.1.0-preview5 HOT 1
- AppWindow WindowState disappears from taskbar HOT 1
- NullReferenceException when clicking FAIconElement/IconSource - Symbol Enum in FAControlsGallery
- Blank space appears when scrolling up in ListView with variable sized elements
- Transparent ToggleButton styles will not work
- GridView control implementation
- NavigationView selection indictor doesn't always show
- Window moves up the screen when resizing.
- NullReferenceException is thrown when using FACombBox with Flyout HOT 2
- ContentDialog buttons not showing HOT 1
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 fluentavalonia.