Comments (3)
There is no particular reason that there is no default style for DataGrid included in AdonisUI. Honestly, I kind of forgot that this control even exists and no one asked for it until now.
I don't think that it would be harder to style it than any other control. I would start with an official template from the Microsoft docs that hopefully has everything on board (I also had the opposite case in the past). This shows the different styles that have to be considered and might show important properties that should be taken into account.
Then I would replace the style contents step by step with the ones from the AdonisUI's list view style. Most styles can be matched I think, so that ListViewItem
becomes DataGridRow
etc. But be careful when replacing the styles as one easily removes things like setters, bindings or triggers which then leads to properties having no effect. There might be some things that cannot be matched easily like the style for DataGridCell
which does not exist for list view. You might be able to re-use parts of the row style for that one.
Put the whole style collection in a ResourceDictionary file and reference it in your App.xaml.
Note that the styles from Microsoft use VisualStateManagers. Those are a convenient way of defining different appearances depending on the visual state, in case you didn't know already. AdonisUI does that using DataTriggers instead, because they support complex conditions which is required for the layering system. So it's fine to just remove all of those.
Hope this helps. Don't hesitate in case you have further questions.
You can leave this issue open so that it reminds me to create the style myself someday in case you have no time to contribute it.
PS: I have never heard or read that the DataGrid should be avoided or anything. But I agree that it is less popular than the list view. Maybe it is because it was added later to WPF when everyone had already committed themselves to list view?!
from adonis-ui.
Hi, thanks for the quick reply and the concrete pointers. I'm certainly gonna look into it! Thank you
from adonis-ui.
closed by #30
from adonis-ui.
Related Issues (20)
- Ribbon control
- RippleHost causing MemoryLeaks HOT 1
- About the select page
- Change accent color at runtime
- center window don't work HOT 1
- MessageBox result closes application HOT 3
- Remove red border around button content when using data validation HOT 4
- AdonisWindow // Hide all buttons property
- Text wrapping for watermark
- AdonisWindow not getting garbage collected HOT 2
- Adonis UI alternative for Avalonia? HOT 1
- Questions HOT 2
- Extend style of control styled with Classic Theme? (.NET 7) HOT 1
- Setting ResizeMode "CanResizeWithGrip" on the window removes Adonis title bar
- Resource not found; ResourceKey='TargetType=AdonisUI.Brushes ID=Layer0BorderBrush'
- visual studio 2022 xaml designer not showing adonisControls:AdonisWindow HOT 2
- Cannot add AdonisUI Custom Components from Toolbox or it's not seen xaml code?
- Add Expander control style HOT 1
- [Support request] AdonisUI styling not applying to codebehind-generated control? HOT 1
- Memory leak to AdonisWindow from HandleTitleBarActualHeightChanged
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 adonis-ui.