I'm searching a C# component or code snipped that does something like that:
I want to inform new users about the most important program functions if he opens a new window for example.
It should be a box showing text (formated if possible) that is of course not modal and has some mechanism to 'go out of the way' if the user enters the textbox area. So that he can access what's underneath it. Alternativly the window could also stick to the border of the window, but there needs to be a way that this also works if the window is maximized.
So I want to present him with a short introduction of what he can do in every corner of my app most painlessly.
Thank you!
I use a "bar" at the top of every window to display some information about the current window/dialog.
Use tooltips. They can be programmatically controlled, and you can have them appear at will. You'll need to add the functionality to your app to keep track of what tooltips have been shown to the user already.
You can add a "balloon" style by setting the IsBalloon property to true.
You can also replace them with smaller descriptions for when the user wants to hover over the control and have them displayed again.
I'm already using tooltips heavily. However, they aren't very practical when displaying bigger amounts of data and they are bound to specific user actions.
Have you considered having a contextual menu for each form / page which contains links to Adobe Captivate style presentations for each available task? That way the user can investigate an example of how to achieve a task relating to what they are trying to achieve from within the application / site.
This approach would require a good deal of maintenance and management if your code changes regularly but coordinating it with a training department can provide rich help features in your application.
See http://www.adobe.com/products/captivate/ for more information.
Related
So I'm sure there's an easy way to do this but I don't know the exact terminology for what I'm wanting.
Essentially in my C# xaml uwp app I have a couple objects that need to have details added to them, kind of like file properties. I have a button that I would like to open up another window (still part of the app), just to enter in the properties. I just don't know the terminology to look up what this window would be called or find documentation for it. So the exact same as when you're in a file browser and you open the properties of a file; it opens in a little extra window that you can drag around.
I don't want to be able to use the main window while the properties window is open, and of course they need to be able to transfer data between one another.
In my previous apps I've simply made a grid that appears over everything else in the middle of the app and shaded the outer area. A workaround as I didn't know how to do this.
Can anyone help me out?
Maybe you can use Dialog refer to https://learn.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/dialogs-and-flyouts/dialogs.
Dialog controls are modal UI overlays that provide contextual app information. They block interactions with the app window until being explicitly dismissed. They often request some kind of action from the user.
I've created a simple dialog here with a list of people. All I want to do is a few simple things which are rather trivial in winforms. However I'm struggling to grasp how to do this in wpf with an mvvm approach. Could someone help me out please.
When the user hits the Add New Person button, I want a dialog to appear where a user can type in their Name and either hit OK or Cancel. If the user hits OK, it appends the person to the list. (keep in mind i'll add more edting fields for the users to input, for example last name...)
When the users has a single item in the list selected, i want them to give them the ability to click an 'edit' button showing a dialog similar to the one in the previous step, pre populated with the selected items data, so a user can edit the properties. Then depending on if they hit OK or Cancel the changes are committed.
Dropbox solution: https://www.dropbox.com/s/8sjpabfod08yil5/AddDeleteItems_basic.zip?dl=
To create and display dialogs using MVVM, you'll want to implement a dialog service pattern to handle such requests. This service would be called from within your view model.
There is a really informative Code Project article about this very topic (Showing Dialogs When Using The MVVM Pattern. My advice would be to read that article and then look through the source files accompanying the article. This should provide you with a very good starting point to achieve your use cases (custom dialogs) and can also be used for displaying standard dialogs too (e.g. open file, save file, browse folder etc).
The service pattern isn't the only way to implement this, in the following article I show how to do it using the same data-driven mechanism used for regular windows:
http://www.codeproject.com/Articles/820324/Implementing-Dialog-Boxes-in-MVVM
I suggest this tutorial for you to get started. However, for the dialog Xceed library has some cool custom controls that may help you.
I'm building a C# client app that allows a user to communicate with one or more existing users in a system via an email-like metaphor. I'd like to present the user with a text entry box that auto-completes on known email addresses, and allows multiple delimiter-separated addresses to be entered. Ideally, I'd also like the email addresses to turn into structured controls once they've been entered and recognized. Basically, I'm modeling the UI interaction for adding users after Facebook's model.
Are there any Windows Forms controls out there with the ability to do something like this? Is there any well-established terminology for a hybrid textbox / control list box (no, not a ComboBox) or something that I should be searching for?
Thanks,
-Patrick
I have had good luck in the past creating composite user-controls to provide specific functionality using native .NET Winforms controls. It works pretty good as long as there aren't too many of them, in which case things start to slow down.
In you case, and this is just off the top of my head, but, perhaps you could take a FlowLayoutPanel, a Button, and a Textbox which supports auto-complete and put these together to create a control that would provide the functionality you are looking for.
If there are no addresses selected in the control (e.g. in a List<string>), then the container (FlowLayoutPanel) would only display the TextBox. Once the user selected an entry, the control would automatically create a Button with the appropriate caption and insert it to the left in the FlowLayoutPanel. If the user removes an address he/she has already selected, simply remove its representation (the button) from the FlowLayoutPanel, and the TextBox can resize accordingly. There may be issues with getting the TextBox to fill up the remaining space (I can't remember how to do that), but you get the idea. The container does not have to be FlowLayoutPanel - you could use a Panel with Docked controls, or even a TableLayoutPanel for this.
A design as I described would allow the user to delete the address by clicking on the button. However, without some other visual cues, that isn't very intuitive or user-friendly, so I would consider making the "Button" be another composite control which contains a "prettied-up" label along with an tiny delete Button (X) to the right. For this you could use a Panel control and dock the X button to the right, and fill the Label on the left. You would provide public properties here as needed to control the text and provide an event handler or callback for the delete functionality.
Once the visual stuff is working, all that is left is to provide the appropriate Properties and Methods on the main control to allow it to interact as needed with outside code.
As a simple, "poor man's", implementation you could take a look at the AutoComplete* properties of the TextBox control. You could dynamically populate the AutoCompleteSource with your known addresses and when an entry matches, add to a separate, list-style control of your choice.
See this SO article for some interesting code snippets related to your question, and my suggested workaround.
Beyond the built-in AUtoComplete properties you're probably looking at having to purchase a 3rd party control from a tools vendor.
I've not seen anything like that before in WinForms. In WPF it would be another matter - if you can use that, maybe consider hosting a WPF control within your WinForms application instead?
I think you're trying to do something similar to this codeproject article: AutoComplete TextBox
And since you mention WPF in a comment, you also have this article: WPF AutoComplete Folder TextBox (should be easy enough to cut out the folder bit of the article I'd thought).
Well, there isn't such a control. If I were you, I'd create 2 textboxes to do the job. See, a normal textbox can easily be configured for autocomplete from a list, even dynamically; however, it accepts only one entry at a time.
So, I suggest you dedicate one textbox for autocomplete, and one for the addresses. So, whenever there is a qualified email address in the first textbox, and you click enter, the address gets added to the address textbox, and automatically add delimitation.
Then you need to handle the addresses in the address textbox as objects instead of characters. Code it in a way that when a user tries to delete a character in an address, the whole address is deleted.
This is the workaround I can think of. I'll help with the code if you give it a try.
All in WPF:
Developing a wizard application, user has to answer a number of simple questions before brought to the main app. The main app is then prefilled with the information obtained from the wizard.
I started with a Window which I then planned to add usercontrols to. The main window would have the user control in the first row, then Next and Previous buttons to control moving between the controls in the second row. This way I could easily control the logic to switch between screens like:
WizardControl1.IsVisible = false;
WizardControl2.IsVisible = true;
But for some reason, user controls do not have setter for IsVisible. Hurray.
So then I thought I would just use seperate windows for each section of the wizard. The problem with this approach is that now when stepping between, the window opens in random positions, and by steppign through the wizard with next, the next window pops up randomly which is really distracting and frustrating.
So how can I develop a wizard properly? I don't get why this is so hard...not exactly rocket science... replacing text and controls and storing input after pressing next/previous!
Thanks
Check this link:
http://www.codeproject.com/KB/WPF/InternationalizedWizard.aspx
This is the article about building wizard in WPF by Josh Smith, it's seems to be nice pattern.
I found it's helpful for me, hope you'll too.
There is also an open source Avalon Wizard control on codeplex.
I'd probably aproach this using data binding and template selectors. Have the wizard form bind to a "WizardData" class, which exposes a list of "WizardPage" base classes.
The WizardData class can expose properties defining the correct info on the forms, and display a control for the main page that uses a template selector to determine the proper control to display based on the actual type of the particular wizard page.
It sounds like more work than it is, really. It also gives you the benefit of good separation between code and UI (all "work" is done by the WizardData and WizardPage classes), and the ability to test logic independent of the UI.
It's also a very WPF/MVVM way of approaching the problem.
I recognize this does not directly address your question, but I thought I'd mention it as a possible alternative. I've used Actipro's Wizard control with pretty good results, and when I have needed support, they have been very responsive. I am not affiliated with them in any way; I just like not having to write the plumbing to manage a wizard.
The property is called "Visibility".
I find that I do better when I dynamically add and removing controls rather than hide them.
I was looking for a Wizard solution too. I have the need to stick with stock WPF components so I implemented the wizard using a standard form and a tab control.
I only hide the tabs at runtime so there available in the IDE. At runtime just use Back, Next, Finish... to navigate thru the tab items
works good
I am trying to create a panel which will have a set of "buttons" on it.
These buttons should have the following behaviour:
Appear similar to a tag (with
rounded edges)
Contain a red
cross to remove the filter/tag from
the panel, similar to the way internet
explorer tabs have an embedded cross to close the individual tab.
allow the user to click
on the tag and respond like a normal
button (as long as the click is not
in the red cross)
Number 1 is no problem, this is just appearance, however, regarding numbers 2 and 3, I am not sure if there is already code out there do to something similar...and I dont really want to reinvent the wheel if I can avoid it!
My question is: Does anyone know if there is something out there in infragistics which will do this simply, or will I need to write this myself by subclassing winform buttons?
Thanks in advance!
Is this new development or maintenance of an existing project?
If it is maintenance, you have a somewhat tougher time ahead. You'll implement a UserControl, probably segmented into two buttons. Use docking to get the behavior as correct as possible. The far right button would contain your cross image; the left (which would need to auto-expand as you resize the control) would contain your primary button behavior. Play with the visual styles until you get them right (EG, removing borders, etc).
If this is new development, and you haven't gotten too far into it, you might consider using Windows Presentation Framework (WPF) instead of WinForms. It will be easier to build the control and get it to look exactly how you want it. WPF includes an extremely powerful control compositing system which allows you to layer multiple controls on top of each other and have them work exactly as you'd expect, and it carries the added advantage of allowing full visual control out-of-the-box.
Either way, this is more work than dropping in an external component ... I've used Infragistics for years, and I can't think of anything they have which is comparable. The closest, but only if you're building an MDI application and these controls are for window navigation, is the Tabbed MDI window management tools -- and there, only the tabs (which replace window title bars) have this behavior.
I don't think that infragistics can do something like this. The UltraButton control can't.
Implementing a own control wouldn't be that hard.
your probably going to have to make a costume control for this type of work.