JRamos
JRamos
CC#
Created by Azim on 10/29/2024 in #help
Is there a way to make a search bar for a datagrid in WPF?
<Button content="filter" Command={Binding RepopulateCommand} />
<TextBox text={binding UserText} />
<Button content="filter" Command={Binding RepopulateCommand} />
<TextBox text={binding UserText} />
private List<Stuff> _stuffs = [];
public string UserText {get;set;} = null!;
public observableCollection<Stuff> Stuffs {get;set;} = [];
[RelayCommand] //from MVVM Community Toolkit
private void Repopulate(){
if(string.isemptyorwhtiespace(UserText)){return;}
var data = _stuffs.where(s => s.Name == UserText));
Stuffs.ReplaceWith(data);
}
private List<Stuff> _stuffs = [];
public string UserText {get;set;} = null!;
public observableCollection<Stuff> Stuffs {get;set;} = [];
[RelayCommand] //from MVVM Community Toolkit
private void Repopulate(){
if(string.isemptyorwhtiespace(UserText)){return;}
var data = _stuffs.where(s => s.Name == UserText));
Stuffs.ReplaceWith(data);
}
4 replies
CC#
Created by Azim on 10/29/2024 in #help
Is there a way to make a search bar for a datagrid in WPF?
naive solution: Have datagrid reference some observableCollection<stuff> VisibleRows. Have a separate textbox and button. Have a button populate VisibleRows from a list of all of your data based on the TextBox content.
4 replies
CC#
Created by alexrees94 on 10/22/2024 in #help
Connecting Lines in 3D space
Do it efficiently with an octree or similar spatial collection.
4 replies
CC#
Created by alexrees94 on 10/22/2024 in #help
Connecting Lines in 3D space
A slow solution is simply storing all of the endpoints of the line segment in a collection, then starting from the top of one, find non vertical lines with an endpoint within 0.0001 of the top, then removing that line from the collection, then continuing until you reach the other vertical lines top.
4 replies
CC#
Created by Muhammad Hammad on 10/5/2024 in #help
C# winforms need help to do this..
Create 26 images showing which finger for which key, then overlay with transparency
3 replies