Comments (2)
In some derivative testing, I found that in the CommunityToolkit.Mvvm variant view would not be initialized when the tab was selected the first time. This was because the load function for the ViewModel's drive data had not been set up before the view was initialized. Adding setting the view DataContext in the View's constructor solves this issue. See the code below.
namespace TreeDataGridDemo.Views
{
public partial class WikipediaPageView : UserControl
{
public WikipediaPageView()
{
InitializeComponent();
this.DataContext = new WikipediaPageViewModel();
}
}
}
from avalonia.controls.treedatagrid.
Avalonia.Controls.TreeDataGridDemo.2024-02-26.zip file attached contains working ReactiveUI and CommunityToolkit.MVVM MVVM form projects as an alternative to the equivalent in the GitHub TreeDataGrid distribution. This new code base has been updated to include the initialization update noted above as well as removing the use of stack panel in MainWindow.axaml as the TabControl Views container for TreeDataGrid views. (See issues and solutions found posted separately relating to the TreeDataGrid scroll bars being functional and visible).
I hope this work provides a Rosetta Stone-like capability for other developers. Going through this code normalization, transformation, and evolution exercise for the two Avalonia MVVM support systems has been an eye-opening learning experience.
Avalonia.Controls.TreeDataGridDemo 2024-02-26.zip
from avalonia.controls.treedatagrid.
Related Issues (20)
- TreeDataGrid and VerticalScrollBarVisibility & VerticalScrollBarVisibility don't work HOT 3
- TreeDataGridPresenterBase Replace Regression
- [Question] How to end cell editing when clicking outside TreeDataGrid control?
- How can you sort a TreeDataGrid by column programatically?
- Missing text in column headers when changing TreeDataGrid from read-only to edit mode HOT 1
- The items are not sorted after setting column SortDirection, despite the column header shows arrow. HOT 1
- How to implement double-click on Row or Cell selection to display detailed view.
- Add `StringFormat` to `TextColumn<TModel,TValue>` options HOT 1
- CanUserResizeColumn and Sort Arrow Spacing
- HierarchicalExpanderColumn is truncated when scrolling up/down if template is composite HOT 2
- Page Up/Down Selection Glitches HOT 1
- [Feature] Allow remove `Columns` from `Source` HOT 1
- Consider making `TreeDataGrid` more extensible. HOT 2
- [Question] New Release? HOT 2
- Best way to deal with IObservable values
- how to set checkbox column's header as checkbox
- PropertyChanged from model not handled properly HOT 1
- PropertyChanged gives exception for enum columns HOT 1
- SelectionChanging事件触发
- .NET Standard/.NET Framework support
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 avalonia.controls.treedatagrid.