What control will be best for Buddy List? - c#

I'm developing a xmpp chat client in C#.NET. I'm little confused about what control should I use for Buddy list. Buddy list will consist of status icon, name & his buddy pic. Can u please recommend that what control will be best for me to use? (Do u think that ListView will be appropriate?)
Another question, I'm using agsxmpp. Does it support invisible status in Gtalk. Is there any library out there bettre than this ?
Thanks.

I think the ListView would be fine, it supports everything you would need. You could also go with an owner-draw ListBox if you want something with a little more flexibility (though obviously, that'd be more work).
As for your other question, I'm not sure. You might want to check the documentation for the library.

Using TreeView will be the best control, it will help you in grouping buddies. I used it before for the same purpose.

The RosterTree code in Jabber-Net would be a good starting point. It already does owner-draw, and could be pretty easily extended to do avatars by modifying the DrawItem method.

Related

Compare strings in WPF and highlight differences in Side by side window

I am working in a wpf project in which I need to compare two strings and display in a side by side window with line number should be shown and differences must be highlighted with color.
I am new to wpf and I don't have any idea about completing this task.
Please help me.
Are you looking at something like Syntax Highlighting of Text after comparison(or identifying the differences)? Below links might help you if you want to do simple highlighting of the text. The idea should be simple perhaps:
Identify the Difference
Find the start and end position of difference
Highlight the difference only.
If you'd want to go for simple solution, check these link if they work for u:
https://code.msdn.microsoft.com/windowsdesktop/CSWPFSearchAndHighlightText-3b5e207a
https://social.msdn.microsoft.com/Forums/vstudio/en-US/7c9a622a-4e3b-451e-bc4c-ab9d011447e0/texthighlighting-in-wpf-richtextbox?forum=wpf
Moreover, there are several controls available online for Syntax Highlighting in wpf. You can simply search for it. I came across Fast Colored TextBox on CodeProject once for similar requirement. Hope this helps.
I think this would be the generic advise I might be able to offer for a generic question like this. Or u may want to go a bit more specific about what type of content you are trying to highlight? Is it Rich text or plain text in a TextBlock? And as the comment above? Any research & considerations you've done? And any code to give an idea about the scenario?

Showing an Activity or View Over a ListIem

I'm trying to add an overlay to a ListItem in an Xamarin Android ListView control. I was able to easily achieve this in iOS and made it appear like the following, in normal view:
And then when you click on the item:
It shows an overlay with additional images (which is actually a UIViewController). I was wondering if it's possible to do the same within Android; I would like to keep the same UI WITHOUT using a dialog, which is what all of the responses seem to indicate so far. Seems like it should be possible... Any ideas how to do it with an Activity (I need an activity to respond to the events within the UI as well).
Thanks.
If I understood correctly, then this is what you're looking for: https://github.com/flavienlaurent/poppyview
You can implement Quick Actions for this purpose. Quick Actions are not provided in the Android SDK
You can find lots of examples on how to create them. Such as here and here.
Although these are not in Xamarin, they can help u in creating them.

Data Templating with user input fields

I'm trying to build a confirmation window that lists to the user all the changes he has made on a given object.
I have already built eh backend that is simply a Dictionary<string, IConfirmation> that lists confirmations that should be made.
However I don't know how to generate a template for each of them that would look like the mockup below, and load them all in a confirmation window after that.
I've already looked at the Data Templating from msdn but it seems to only template static data (i.e. no input possible neither embeded control).
Any idea? Thanks in advance for your help!
Don't expect for code since you didn't provide any code to start with :). But DataTemplate seems to be the right option for this, in my opinion. The above MSDN link you posted shows exactly how to use DataTemplate in detailed, step by step manner. You can just follow what explained there, and change TextBlocks to TextBoxes or any other input control you want to use. Using input controls shouldn't be an issue for DataTemplate as long as you use DataBinding in two way mode.

Can you make a "separator" in ASP.net Textboxes? (C#)

I was just curious if it's possible to put a "separator" (Not sure what you'd call it) in a textbox in ASP.net. For example, I want a textbox on my form to be a blank textbox with "blank:blank:blank" so they can just type the time, and another to be "blank/blank/blank" for the date, and so on. I've tried googling it for a bit but didn't find what I was looking for, probably because I'm calling it a seperator, and I'm not sure how accurate that is. I was hoping it could be done that way, but if there's another way, I'm using C#. Let me know if I explained that right at all or if you can recommend anything. As before, I appreciate the help from this community!
Probably should start with checking out if an input mask meets your needs. The AJAX Control Toolkit might be a good place to start when looking at easy to use controls. Check out their MaskedEdit control at: http://www.asp.net/ajaxlibrary/AjaxControlToolkitSampleSite/
Use the MaskedEdit control in ASP.NET (from the AJAX Control Toolkit), should do exactly what you want.
HOW TO Use the MaskedEdit Control in ASP.NET

How can I create my own ListView UserControl?

Ok so I have a table cell that I would like to use in this custom ListView UserControl, so I was wondering how exactly do you set one of these up and how do you call the cells to be my custom ones? Any help would be greatly appreciated :)
The ListView control is a b**ch, so if you are really planning to get your hands dirty with it, be prepared for a great big mess.
If you would prefer a ready-made solution, I will point you to this one: CodeProject - ObjectListView
We at ComponentOwl made custom ListView control called Better ListView. (Or maybe you can be interested in the freeware edition Better ListView Express).
You can also try the suggested ObjectListView.
The ListView control is -very- complex and contains myriads of little features all we had to implement. So I recommend you to look for a finished 3rd party control, since coding this is challenging (the BetterListView hit 40K lines of code only to meet requirements of ListView, now having about 80K+ lines of code!)

Categories