Comments (6)
Got it reproduced now, thanks for reporting.
This seems to occur in case the GridView.Columns
are not specified.
I will add a null check at least and see whether it makes sense to collapse.
from adonis-ui.
May I ask what your use case for this setup is? Using a ListView but not specifying any columns sounds to me like a ListBox is what you really want.
from adonis-ui.
I was reporting the bug based on the demo.
In my project, I was specifying columns in a ListView
<GridView>
<GridViewColumn Header="Name">
...
</GridViewColumn>
<GridViewColumn Header="Age">
...
</GridViewColumn>
</GridView>
It seems to be a problem only when HorizontalOptions is set to stretch - which I suppose WPF doesn't like
from adonis-ui.
I am not quite sure what you mean. I do not get any exception in the demo when clicking on a GridViewHeader so it would be helpful if you could explain it a bit further.
In which exact scenario do you get an exception? Is the code you posted causing errors or is this working code? And what do you mean with "when HorizontalOptions is set to stretch"? Do you mean HorizontalAlignment
? And if so, where do you set it to Stretch
?
In order to fix it, I need to reproduce it. I indeed got errors when there are no columns defined. And that is what i have fixed. If you still get errors because you mean a different scenario please tell me what I have to do in order to get the errors as well.
from adonis-ui.
Sorry, I thought it'd be easy to reproduce :)
If the columns don't fill all the available space, a "clickable phantom header" is visible (see screenshot and xaml) - clicking it produces a crash.
<TabItem Header="Grid View">
<ListView ItemsSource="{Binding Items}">
<ListView.View>
<GridView>
<GridView.Columns>
<GridViewColumn Header="Name" DisplayMemberBinding="{Binding Name}"/>
<GridViewColumn Header="Weight"
DisplayMemberBinding="{Binding Weight, StringFormat=N2}"/>
</GridView.Columns>
</GridView>
</ListView.View>
</ListView>
</TabItem>
It appears that the phantom header is extends from "Name" to the edge of the container. The best way to hide it is by adjusting the column width to fill space, or adjusting the listview width to fit the columns.
from adonis-ui.
Thank you for taking the time to add some details.
Now it makes sense to me what you meant with "empty space". I did not really get that before although it seems quite obvious now.
But I am glad that the null check fixes that already, even though it targeted a different case :)
Stretching the columns to eliminate the empty space is not possible with simple XAML as far as I know. Maybe I could build another extension for that in a future version if you would like to see this.
from adonis-ui.
Related Issues (20)
- AdonisUI Not Showing in Designer HOT 4
- Improved indication of dark ToggleButton state
- 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
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.