C# Day from Week picker component - c#

This question is for C# 2.0 Winform.
For the moment I use checkboxes to select like this : Monday[x], Thuesday[x]ΒΈ... etc.
It works fine but is it a better way to get the day of the week? (Can have more than one day picked)

Checkboxes are the standard UI component to use when selection of multiple items is allowed. From UI usability guru Jakob Nielsen's article on
Checkboxes vs. Radio Buttons:
"Checkboxes are used when there are lists of options and the user may select any number of choices, including zero, one, or several. In other words, each checkbox is independent of all other checkboxes in the list, so checking one box doesn't uncheck the others."
When designing a UI, it is important to use standard or conventional components for a given task. Using non-standard components generally causes confusion. For example, it would be possible to use a combo box which would allow multiple items to be selected. However, this would require the user to use Ctrl + click on the desired items, an action which is not terribly intuitive for most people.

checkbox seems appropriate.

You can also use a ListView with CheckBoxes on...
for a little less hard coding.

Checkboxes would work fine, and there is a preexisting paradigm of that usage in Windows Scheduled Tasks. To see that example, create a scheduled task and select Weekly for the frequency.

Related

Winforms, can I use a text box here instead of a combobox? (dropdown list with over 15k options)

For the last few weeks I've been building a product demo for work which includes a winform to enter new customer enquiry information. One of the form elements is a text box which, for the sake of ease, I haven't imposed any validation on so far. However, I now need to make it so that the user can only enter a valid location from an sql database table (containing around 15k streets).
I'm still quite new to C# programming. My first thought was that I should change my text box to a combobox but I seem to remember that when you click on a combobox all the options in the list appear before you've typed anything. Since our computers are slow and there's so many options, I don't really want to flood the screen so I was wondering if there was a way I could continue using my text box and onkeypress (probably the tab key) a dialogue pops up with all the closest matches from the list, prompting the user to select a valid option?
If not, is there a way to stop my combobox from showing the option list until prompted?
I would not think a combobox is not well suited for that many items.
The way I have approach this is to use a separate list view to show matches. You could probably put matches in a drop-down style borderless window, but I find that more complex and may be difficult to make the interaction work well.
I would just have the streets in a separate list view control and apply a filter to that.
Make sure the view is resizable, I find it very frustrating when working with old window controls where the list is tiny due to it being written for 640x480 screens, and does not allow resizeing.
Keep performance in mind, when searching with each key-press you might want to fetch all records and do the search in memory rather than making a sql query for each key.

How to create a custom selectionmode in winforms listbox

I have a listbox in a winforms application that I would like to give a selection behavior that is different than the built in options for the control.If I choose multi-extended, I get what we are accustomed to - ability to use shift or control to select multiple items in the list. The multi-simple option lets you select individually and leave the item selected until you delect it. I'm trying to deal with a slightly different problem that could be solved by a combination of the two options. My users want to be able to use the shift key to highligh a long list and they don't want to accidentally lose their selection if they mistakenly click on one other item in the list. My thought was to keep everything hightlighted until they click a clear button. I kind of think they are asking for something that is not what Windows is meant to do and should not be allowed to do but I thought would post the question so see if anyone has done this before.

Metro style: how to show filtering options for longlistbox in a proper way

I have a large collection of items with several parameters, so i'd like to give a user a possibility to have different filters: like order by time, by alphabet, or by categories.
How should i implement filter selection in Metro style? Should it be a menu items like this, but with "filter by alphabet" instead of "menuitem 1" ?
Edit:
Some more details: so, assume we have Movie items with 4 fields: name, year of release, genre and main actor's name. I'd like to allow user to set filtering by 1 of those 4 fields. Actually, it is not filtering or sorting, its more like categorizing.
Ok, i found this thing, looking quite nice.
Edit: though, be careful, it is not working the same as on the picture. At least, current version is not fading the screen, so other controls still would react on user input and Back button.
No way - the AppBar menu is not the way to go. For filtered content, you would normally use LongListSelector (both on WP7 and WP8). The filtering can be set by you when you group (or re-group) the items bound to the control - for the filter setter you could use any control (e.g. a auto-complete text input control or a ListPicker).

List objects in a panel

i got a question regarding C#
I'm about making a program to hold all my daily tasks, and i need to show them in some kind of panel/list, Ive tryed with the gridview and it worked fine, but i don't want a "table" look, i rather want somekind of access database look, so it creates a new textbox/label maybe a panel with several informations - got any suggestions for this one? if it's possible in a easy way.
If you want just use WindowsForms, you can, for example, define a UserTaskControl:UserControl that holds unique set of controls you need for single entry.
Let's say you need for single entry to have Title, StartDate, EndDate, Description, so you can create a control with 4 TextBoxes or 2 TextBoxes and 2 Calendar controls (matter of design choice).
After define on main window TableLayoutPanel and at runtime add new instances of your UserTaskControl in the moment you need a new entry in your task list.
If you want to make things much better, consider of using WPF, as there you can use also UI Virtualization technique (just one example), which can make a difference in regard of WindowsForms, if you have too much entries in your list (too much is application specific measure, obviously). But in this case you need to learn WPF and learn to use it in a good way, which is a right thing to do IMHO, but depends on how much time you have.
Hope this helps.
A listview with checkboxes to check off when you've completed them? You can make the items editable or put in an "editing panel" to use to edit the values.
So you'd have:
[x] Get dressed
[x] Take out the garbage
[x] Make breakfast
[x] Ask ? on stackoverflow !
[ ] Implement solution
I did this one for work as a task tracker.

UI for creating invoices

Currently, I'm in the process of making a custom solution for invoicing. I have created multiple ways for customers to create their template (HTML, Word, LaTex) and get invoices according to their template. However, these invoices are party manually generated.
So, the process is:
Request to create a new invoice
An preliminary invoice is created
The user gets a chance to make changes (i.e. add, remove, change rows)
Create a pdf
Just to be clear, the preliminary invoice does not need to be formatted as the template is, but you should be able to add/remove/change rows and for every cell, indicate whether the value should be visible in the final result.
My problem is that i cannot find a suitable way to display the preliminary invoices. I tried a datagrid (default, telerik, devexpress), but it's too messy. Besides a datagrid, i have no idea what i can use.
What controls can i use best to have a nice and usable UI.
Please don't be like this:
alt text http://bitsandpieces.us/wp-content/uploads/2008/03/imagesapple-20google-20and-20you.png
A typical UI paradigm for this kind of thing is to view it as two separate problems: giving the user a way of viewing the elements that he can modify, and giving him the ability to modify any specific element. You use a list control (ListBox, ListView, maybe TreeView if the elements are organized hierarchically or need to be grouped into categories) to present the elements, and then when the user selects an element the program presents a tabular presentation of field names and editable value controls.
Basically, you're dividing the program's functionality into two categories: stuff that the user wants to do to rows (add, remove, re-order, select) and stuff that the user wants to do to the selected row's elements.
You can mush these two sets of functionality into one if you use a DataGridView, but as you've seen that gets pretty ugly if there's any complexity to the elements you're editing.
Two possible approaches to this: the property-sheet paradigm (select object, right-click, select "Properties", edit values in a modal dialog), or a paradigm where the window's split into two panels, with one being the rows and the other being the details of the currently selected row. There are lots of others.
What is your platform? Winforms? WPF?
What exactly did you dislike about using a datagrid for this? Part of the problem is that whether you like it or not, you're going to be coding a datagrid - you essentially described features of one. If at all possible try to use someone else's datagrid because it will save you a lot of work. Typically, 3rd party datagrids should be fairly customizable, and you should be able to make it look however you want - and take advantage of the built in sorting, editing, grouping, etc. Creating a datagrid-like control from scratch isn't easy and should be avoided if possible.
You don't have to have a plain giant datagrid - you can crate a custom control that displays the invoice formatted however you like, with a live datagrid appearing only where the invoice shows tabular data, formatted to appear as an integral part of the invoice itself.
I'm doing something similar, where the client can edit or even remove the line items for the invoice prior to sending it to the client.
The current app they run their business on is a WebForms Intranet application, so this is an extension to that. So they can add/remove/edit rows fairly easily.
But Egor is right. You're essentially talking about a datagrid no matter what you do. I take it you want something 'cleaner' and more intuitive?
Simplicity is difficult.
I would take a look at what is already out there, especially for invoices, and see how they are doing it.
Not sure how big your company is, but it never hurts to take advantage of the large company applications and user interfaces, the pour thousands/millions of dollars into user interface design and testing.
I would take a look at any of the following (most offer a free trial, or just try searching for screenshots):
www.freshbooks.com
www.invoicera.com
www.getcashboard.com
www.simplifythis.com
Just some ideas ... hope this helps!

Categories

Resources