.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

List of System Colors?

Posted By:      Posted Date: September 13, 2010    Points: 0   Category :WPF
I want to have either a combobox, listbox, or even listview where the user can see the list of color options to choose from. Is there an way to get a list of the System Colors? I know how to use the the fonts to make a list of the fonts with <CollectionViewSource Source="{Binding Source={x:Static Fonts.SystemFontFamilies}}" x:Key="myFonts"/> I can't find one for Colors. So basically my question is is there a similar function for Colors? MY only other alternative is to manually set the list of colors.

View Complete Post

More Related Resource Links

How to Cache System.Collection.Generic.List object


I need to cache System.Collection.Generic.List object with expiration time

var Root = from feed in feedhotel.Descendants(ota + "HotelContent")
                           where (feed.Attribute("HotelCode") != null)
                           select new xmlhotel()




return Root.ToList();

Is it possible to cache Root.ToList() for some time....

ImageList and a system image list handle

How can I have an ImageList use an image list handle of a systems image list, such as one that can be returned from SHGetFileInfo ? My image list is associated with a ListView control and this could be easily done in Win32 through the LVM_SETIMAGELIST message with an image list handle but I see no easy way of doing this with the .Net System.Windows.Forms.ImageList component.

List does not exist -- AutoStart Workflow: System.NullReferenceException:


I have been in a discussion on the MSDN forums concerning a site with which I am having considerable issues.  (http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/0feaf4c7-77cd-46c6-b3cd-4d18c69b18c3)    There is one issue that keeps cropping on one of the pages on that site.  The page is a customization of the EditForm.aspx which is being used to edit folders. We call it EditFolderForm.  Like the EditForm it uses a DataFormWebPart.  It also has a SharePoint:SaveButton  and a SharePoint:GoBackButton.  The Listid on the page has been confirmed to be the correct ListID.  Clicking the SaveButton causes the following two errors:

List does not exist  The page you selected contains a list that does not exist.

and then

AutoStart Workflow: System.NullReferenceException: Object reference not set to an instance of an object.

I have found references that mentioned getting these messages for custom made workflows that are built on Designer.  However the workflow being called is a built in SharePoint Workflow so that none of the suggested fixes will work.  (Also it seems that the workflows that cause the issue seem to be sending

dropdown list items in correspondig colors rather than black


hi can any body help me to code,

i have a dropdownlist for which i have items like red,blue,yellow,green...etc  but these items default static color will be black for all items,

but my requirement is to Red as red color Blue as blue color Green as green color

<asp:DropDownList ID="ddl_node_color" runat="server">
           <asp:ListItem>--Auto Fill Color--</asp:ListItem>

Task List Modified by showing system Account

I have developed Sharepoint Designer Approval Workflows. Task List showing System Account instead of who has approved the workflow.

I need to track the users who has approved the Workflows.

Thanks in Advance,

System.Runtime.InteropServices.COMException: List does not exist.


I just setup a list. I added a few items to it and then added my web part to the site. 

Now if I go back to the list settings under /_layouts/listedit.aspx?List=%7B5A3E222D%2D9350%2D49E9%2DB433%2D12D4223011E7%7D

I get the attached error. How did my list get removed and why can I still see items in it in AllItems.aspx?

 Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: List does not exist.

The page you selected contains a list that does not exist.  It may have been deleted by another user.<nativehr>0x81020026</nativehr><nativestack></nativestack>

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and locat

Distribution List System.Net.Mail.MailMessage


I am not able to send to a Distribution list via a full email ie. group@domain.com via MailMessage.  I can successfully send to a single user email address with success but not to a Distribution list.  Your help would be appreciated thank you.


Sharepoint List Column Custom Colors With Group By column Option


I have tried to implement the custom coloring or manipulating data on columns in multiple ways like





However, all the above does nto work if you enable the "Group By" column option in the "Modify View" settings. It does work if the "Expanded" option is checked, however, it does not when "Collapsed" option is selected in "Group By" options.

Any help will be appreciated.

To list all running tasks - System.Threading.Tasks


Hi everyone,

I am working on System.Threading.Tasks namespace. My requirement is to see all the running tasks within a program, their state and interdependencies.

I have looked at the http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.aspx but could not find a way that will list all running tasks. Would you please guide me how to approach and where to look for?



System Development Life Cycle

The Systems Development Life Cycle (SDLC) is a conceptual model used in project management that describes the stages involved in an information system development project from an initial feasibility study through maintenance of the completed application. Various SDLC methodologies have been developed to guide the processes involved including the waterfall model (the original SDLC method), rapid application development (RAD), joint application development (JAD), the fountain model and the spiral model. Mostly, several models are combined into some sort of hybrid methodology

The Agile System Development Life Cycle (SDLC)

The goal of this article is to describe the agile system development life cycle (SDLC), putting it in context from what you may have heard about within the agile community and more importantly within the context of your overall IT efforts.

Ready made List Types provided by SharePoint

SharePoint provides some out of the box List Types. Some of the most used ready made list types that SharePoint provides currently are listed below:

Export SharePoint List to Excel Spreadsheet Programmatically using C#

In SharePoint applications, Custom Lists are used to store business data and Document Libraries to store the documents. But for data manupulation and analysis, Microsoft Excel provides very rich features as compared to SharePoint Lists. That's why people still loves to work on Microsoft Excel Sheets.

Dropdown list in ASP.NET - How to get value selected

am sure this must be very simple, but unforunately I can't figure it out.
I have the following code which populates the dropdown lists from the database. This works fine. Now, when the user selects a particular employee name from the list, I want to get the Employee Id of the selected employee. i.e. I need to get the "Eid" value. I can do this if the EId is loaded in the dropdown list, but in this case only the employee name is displayed. Please let me know howI can get the Eid value even though it is not loaded in the dropdown list.
I would really appreciate your help

Performance Tests: Precise Run Time Measurements with System.Diagnostics.Stopwatch

Everybody who does performance optimization stumbles sooner or later over the Stopwatch class in the System.Diagnostics namespace. And everybody has noticed that the measurements of the same function on the same computer can differ 25% -30% in run time. This article shows how single threaded test programs must be designed to get an accuracy of 0.1% - 0.2% out of the Stopwatch class. With this accuracy, algorithms can be tested and compared.

Creating Sites/Lists/List Items under Current User Context in SharePoint By Using SPUserToken

Usually we do this by performing the action under RunWithElevatedPrivileges method and updating the listitem using SPListItem.SystemUpdate() method (see here). but this approach has its own flaws like (RunWithElevatedPrivileges will run under system account, we cannot use SystemUpdate for SPSite,SPWeb,SPList, since it runs under system we will "CreatedBy" by as SystemAccount).

Editable Gridview with Textbox, CheckBox, Radio Button and DropDown List

This is an example of an editable gridview containing different ASP.NET controls. When user wants to edit values in gridview, she/he can use these controls to edit existing values in Gridview Edit Mode.

Using the Code
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend