How would I create a silverlight control for tagging content similar to StackOverflow? - silverlight

I am new to Silverlight. How would I go about creating a control for users to tag content.
I would like it to work like it does it StackOverflow i.e. Autocomplete and when you press space it inserts the tag in a box with a remove button. I want the control to be bindable to a collection of strings.
If someone can just point me in the right direction to get me started I would be very grateful.

You need to start with an AutoComplete Textbox, there is already one available in the Silverlight Toolkit. Tim Heuer has several examples using it (he actually creates one himself in one of his posts somewhere), you can find one sample here. Once you have this in place, the rest of the control is pretty simple.

Related

Creating a walk through in WPF

I'm trying to add a "walk-through" mode to my existing WPF project which will guide the user through the process of using my application. Trying to look this up is difficult, because every Google search for "WPF walk through" returns a walk-through on how to use WPF!
I've thought of something like using tooltips and programmatically controlling when they are visible for each control in the GUI ("Press this button next, etc") but I'm hoping for suggestions on a better way as I'm still pretty new to WPF.
Thanks,
Mike
I would use Popup.
Just show same popup with different content near to interested controls
What you appear to be looking for is a wizard... check this one out:
Extended WPF Toolkit™ Community Edition

Windows 8 like modal dialog using WPF

I am working on a WPF-MVVM (.Net 4.0) application that has a Metro look (it just has a look, it is not a metro application.)
I need to show a windows 8 like message box that blocks the operations for the user before he rids that message box by clicking yes/no/cancel (or any button.).
I came across this otherwise great article and momentarily thought that I have found the solution. But this has its own drawback.It just stops the user from interacting with the controls behind by mouse clicks. The user can however use the tab key to get back to the buttons behind and click them (pressing enter).
A number of things are coming to my mind:
should I go for custom adorners and play with hitTestable property?
Or should I place a control and play with its visible property.
Before going for any approach I thought of putting forward my question to the wonderful community here if someone has done a similar thing in past and provide me some pointer/reference/approach.
Can someone suggest what is the way to achieve this? Please note I will be happy to use prism or any other open source if that solves the purpose but the window will have to be custom made.
Please excuse me if you find this too stupid a question. Please pardon my ignorance. Thanks for reading this.
I recently came across a similar problem, I resolved it using a DialogPresenter as explained there:
http://www.codeproject.com/Articles/36516/WPF-Modal-Dialog
I had to do a few tweaks there and there but overall it's working fine and I now have a nice way to display dialog boxes!
There is a better way of doing it
var dialog = new MessageDialog("Select Social network is already authorised!");
dialog.ShowAsync();

Can I use the WP7 Panorama control outside of WP7?

I need a WPF control that acts like the Panorama control for Windows Phone 7, but I need it for a desktop application.
It will contain a series of panels (or Panorama Items) that the application will be able to slide through horizontally programmatically.
Also, the content inside the panels not currently displayed on the screen will need to be "lazy loaded". In other words, they should be referenced but not loaded or rendered.
Can I somehow adapt the WP7 Panorama control to do this? Or will I have to develop a custom control from scratch to behave similarly to it?
Thank you!
EDIT:
I could probably use a VirtualizingPanel to implement the lazyload behaviour.
MahApps.Metro while still not super mature does allow for the wp7 Panorama control. Demo of how to use a panorama here. I've played with it a little and while its not the most customizable thing out there it gets the job done. Pretty sweet. Also Sacha Barber (Codeproject Demigod) wrote up an article on making your own. Of which I haven't looked at yet but, the guy usually does awesome work. So I'd check that one out as well.
http://blogs.microsoft.co.il/blogs/arielbh/archive/2010/10/21/porting-windows-phone-7-s-panorama-control-to-silverlight-4.aspx gives some clues about how do to this.
It suggests using http://phone.codeplex.com/ as your base and then you can use http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=4b281bde-9b01-4890-b3d4-b3b45ca2c2e4 (Microsoft Surface Manipulations and Inertia Sample for Microsoft Silverlight) to run convert get it to respond to touch.
Seems none exist as far as I can see so far.
This blog has started an attempt at making it, so you could work from there to make your own. Be sure to also check out this page which details the creation of an individual panorama item too.

MVVM DESIGN PATTERN

Am very much new to this MVVM DESIGN PATTERN.Am doing a small project in this pattern
In my project i have a button,if i click on that button it will create a new button at run time and we can create any number of buttons there.
Creating mutliple buttons is working and now am trying to move that controls at runtime where ever we want in the same window only.
I implemented some methods and now controls are moving with my mouse point as i want but now what is the problem is::
if one button is created it is moving fine when the second button is created
then it is coming attached to the first button now both the buttons are moving together and third and so on..
i cant able to understand whats happening over there?
Can Any one help me plz ??
Thanks In Advance
i dont know how to post code over here
if anyone give me your mail id then i wil send whole project to them
ThanQ Once Again
You might be interested in Laurent Bugnion's "Understanding the Model-View-ViewModel Pattern" session at MIX10 http://channel9.msdn.com/Events/MIX/MIX10/EX14

WPF application with many user controls

I'm writing an application that is supposed to show and hide the content of the main window stack panel based on the user choice. For example, the user clicks on the button that displays the list of the customers, then click on the button that displays the ordering form. The customers content should be hidden and the ordering form should be visible. Moreover, if there are contents with related information (like customers and their data) I want to be able to change the data in one window and it should automatically refresh the data in the other window when the user decides to open it. Is there a good way to do it in MVVM?
Thanks for any suggestions.
Because this question is so generic, the answer must be as well, and the answer is that this is exactly what MVVM is for - modeling data and binding it as needed. In fact, I would argue that a majority of MVVM examples you find online will be some flavor of an answer to your question, most likely using good ol' Northwind.
It sounds like you need to really take a good look at how you want to do your design before you jump in and start coding.
You might want to check out Prism (or as it is really named Composite Application Guidance). You can build really complex and modular designs with it.
You might be interested in the MVVM sample applications of the WPF Application Framework (WAF).
Writer: Shows how the Views (UserControls) can be switched (Edit mode; Print Preview mode).
BookLibrary: Shows how data modified in one View is automatically updated in other Views.

Resources