If you have a dictionary with scalar entities, its is fairly straightforward to get either all the Keys or the Values as a list: Let’s say we have: Dictionary<string, string> MyDictionary To get all the keys as a list: MyDictionary.Keys.ToList() To get all the values as a list: MyDictionary.Values.ToList() If you have a case where […]
Posts with the C# tag
Accessing DataGrid data in C# with WPF
If you need to access row and column data values in a WPF DataGrid you’ll realize it is bit of a pain. It’s definitely easier to do this in WinForms but that may not be what you’re using. So here’s how you can access WPF DataGrid in your code: Do note that I’ve used the […]
Using OxyPlot library with C#
If you’ve used built-in charts in .NET framework, you’d realize they’re a bit limited in their functionality and are not very flexible. An excellent alternative is the free OxyPlot library that enables you to add advanced graphical plotting capability to your application. The following steps outline how to use OxyPlot in a Windows Forms application: […]
Using native Charts and Graphs with C#
Test and Measurement applications often require display of data in a graphical format and T&M engineers are familiar with display elements called “charts” and “graphs”. These are everywhere from instrument displays to software GUIs. So when it’s time to use C# to create a custom application, one expects nice and easy to use display elements, […]