How can I achieve this layout in WPF C#? [closed] - c#

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
As you can see in this image:
It's a table containing different controls(e.g. button, list, text) on the columns that can be sorted and each row is unique to each other. Any help or starting point would be greatly appreciated.

You would typically have an Observable Collection which holds the objects of interest (i.e. in your screenshot you have a person with a name, age, etc), so it could potentially be an ObservableCollection of Person objects.
Once you have that, you can build up your view in XAML. Typically you'd have some sort of list control (list view, list box, etc) that binds to the collection, and you create a data template in order to customise the look and feel of the control to match how it looks in the screenshot.

Related

C# - Detect three game objects in the correct order [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I have switches in Unity 3 that I operate with my player. At the moment I set one variable each to TRUE.
Now I want a trapdoor to open after pressing the switch. But this should only happen if you press the switches in the right order.
How do I solve this in C# code?
Don't get into the logic.
Maybe somebody with a code example can help me how this could look like. It could be pseudo code as well.
Thanks
Have a collection that contains the IDs of the switches in the order you expect.
When they press their switches, add the ID of the switches to another collection.
When collection length == number of switches, compare the IDs in the collection to the IDs in the same position in the expected order. If they match, then open the trapdoor.

About ListBox limit item [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
Hello everyone,I am new here, can I ask a question:
Let's say I have a ListBox (with more than 5k items of all English words ). and a richTextBox.
And a ListBox usually load every items, right? How can I change my ListBox to just load/pick a few (maybe 10 items) from the data?
EXAMPLE:
**When a user type a word, I dont want my ListBox to load every thing starting with the word my user input. I just want my ListBox to load just a few item.(More to like a word prediction software) **
Please give an answer that is not too complicated, since I am a beginner.
Thanks, Teik Fai.
From your question, it looks like you need to implement virtualization on the listbox.
You can either use a VirtualizingStackPanel inside a Listbox as ItemsPanel Template or you use - ItemsControl and set its property VirtualizingStackPanel.IsVirtualizing="True"
This should help.

Make scrollable dynamic list of objects in Windows form [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I would like to make a simple Windows Form application which displays a list of persons. This list is dynamic (coming from a webservice).
For example, assume we have the class Person with the properties id, age, name and email. My code will make a request to my webservice and retrieve
List<Person> list = ...;
In my GUI, I would like to show the person in a table-like, scrollable structure (each row is a person). It is important to me that I can design the rows by myself and not use some boring basic list with text only. For example, there should be a contact button in every row in order to contact a person by its email. Or one column could contain a user image etc.
Question
What is the common way to do that? Would you use a table layout panel? Are there some good tutorials out there to show the workflow of my setup?
Is there a way to design one row in the Visual Studio Designer and dynamically generate the others from that pattern?
I would appreciate some tips.
I think a DataGridView is what you're looking for. You can add buttons, checkboxes, ect... It is table like, and can be sorted if needed.

Indenting listview item with icon in c# [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I want to create list view with indented icon and I came across that:
There is a solution, but it's non-dotnet and I was wondering how I could achieve this with C#?
Thanks!
See this MSDN page. Use the IndentCount property of the ListViewItems.
However see the remark there:
The IndentCount property can be used only when the View property of
the containing ListView is set to Details, and the SmallImageList
property of the ListView is set.
The example there works easily.

How to add property to a ListBox? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
VB6 had a fileListBox with .path property and I am trying to add that property to regular listbox.
ListBox myfilelistbox = new ListBox();
and the one generated with XAML.
I think what you want is Attached Properties
ListBox is a generic control which displays list of items in a linear manner. What you wish to do is to display a hierarchy of items, not a list of them.
There are no such built in controls and you will have to build one for yourself or find some that others have implemented.
Check more information on this other Stack Overflow thread Is there a WPF control which will show a list of files in an Explorer-like view?.
The following article on CodeProject could help you: A WPF File ListView and ComboBox

Categories