I am binding some business objects to a WPF ItemsControl. They are displayed using a custom IValueConverter implementation used to produce the Geometry for a Path object in the DataTemplate as shown here:
<ItemsControl x:Name="Display"
Background="White"
HorizontalAlignment="Stretch"
Vertical...
I have been playing with generics and was hoping I could get some feedback or suggestions on a function I created to help handle reading null values from the DB. My main concern is in the if statement. Is there a better way to find out if T is a string ect.? Thanks.
public static T CheckNull<T>(object value)
{
if ((value ...
Is it possible to make a Workflow not unload when it has become idle?
...
I just upgraded one of my application's methods to use compiled queries (not sure if this is relevant). Now I'm getting contradicting error messages when I run the code.
This is my method:
MyClass existing = Queries.MyStaticCompiledQuery(MyRequestScopedDataContext, param1, param2).SingleOrDefault();
if (existing != null)
{
MyReque...
Putting aside the discussion of the merits of including a Tip of the Day in an application (a la Is Tip of the Day Good) I am seeking either a ready-to-go library or C# source code for a .NET tip-of-the-day dialog for an open-source project (so I am looking for an open-source component, of course). It is usually easy to locate a needed c...
Hi All,
I am using Unity DI container. In the config file I specify the following type as :
<type type="Interfaces.ILogger,Interfaces"
mapTo = "ConcreateClasses.ConsoleLogger,ConcreateClasses" />
My understanding is that both the Interfaces dll and ConcreteClasses dll should be referenced in my project in order for this to work.
B...
If I do a query (I plan to use SDS.P) against the global catalog, what should the starting path be so I can search the entire GC?
I want to enumerate all users in GC, for example.
Let's say my gc has users for 3 domains (one parent, two children):
TEST.COM
ONE.TEST.COM
TWO.TEST.COM
and i'm on a computer in ONE.TEST.COM. I do no...
Is it possible to create a method which performs debugging assistance like the System.Diagnostics.Debug class?
I'm looking for a way to construct a method which when called by an assembly compiled with the DEBUG conditional compilation symbol defined, results in an operation, and which is a no-op when called by an assembly without the s...
Is there an easier way to test if a file system item is a directory than using bitmasks?
I have this code in one of my applications (two second line is actually in a loop over folderItems but for simplicity assume the first element):
Dim folderItems As String() = Directory.GetFileSystemEntries(aFolder)
Dim someDirItem As String = folde...
For various reasons we use ilmerge to put all of our application assemblies into one file so the user needs to handle just one file. Unfortunately it seems that there is no way to merge the .pdb files with the assemblies. Anyone knows a way to work around that?
...
Hello eveyone,
I am looking for an easy to use, maintain and extensible search engine (intranet, enterprise search engine) based on .Net technologies, better open source which is more capable of extension. Just similar to Apache Lucene and Apache Solr. I want to search html page only.
I tried Microsoft Search Server and find it is not ...
I want to add events to some built in .NET classes. For example I want to add the following events to a generic List(T):
ItemAdded
ItemRemoved
ListChanged
etc
I can think of a few ways to accomplish this, but I'm not sure which approach is best.
I could use "extension events", that is, if there is such a thing or a way to use exte...
Hello everyone,
I am using VSTS 2008 + C# + .Net 3.5. I want to find a tool (open source) which crawls all web pages for a web site, and for any other domain pages which is linked by this web site, I want to skip to crawl them (I only need page for this specific domain only). For crawled web page, I want to store them into local file di...
Hi,
Is there an equivalent to the System.ComponentModel.IExtenderProvider geered toward WPF ?
Do I have to go toward Dependency Properties and Attached Properties to build an equivalent, or is there already something baked in the oven waiting for me ?
Thanks,
Patrick
...
I wanted to set a value of BrowsableAttribute for some of MyClass instance's properties at runtime:
public class MyClass
{
[Browsable(true)]
public int P1 { get; set }
...
}
Please advise how it can be done as well as how to add BrowsableAttribute to a MyClass instance's property at runtime if this attribute doesn't e...
The ComboBox Items collection is an ObjectCollection, so of course you can store anything you want in there, but that means you don't get a Text property like you would with, say, a ListViewItem. The ComboBox displays the items by calling ToString() on each item, or using reflection if the DisplayMember property is set.
My ComboBox is i...
I have a simple C# WinForms Crud AP for employees that have to do a lot of simple web lookups. Currently it loads 5 websites and puts a search term into the clipboard. The employee then has to paste the search term into the search textbox on each of the sites and hit enter. Is there a simple way to enter the data for them? The search tex...
I have a number of tables with lots of columns that I'm using Dynamic Data with. I only want to show a small subset of the columns.
Currently when Dynamic Data scaffolds a table it creates all the columns unless I set [ScaffoldColumn(false)] to false. This works but as I only want to display a small subset of the columns it would be eas...
I am building an internal, data-heavy website for my company on the Microsoft stack (ASP.NET 2.0/C#/SQL Server). Lately I have been trying to improve the layout and design of this site, partly because I want it to look good for my employers, but mostly because I want to learn about page layout and design.
My question is, what is the fi...
I need to provide a feature such that the user is able to upload a csv file.Once the uploading is done I need to retrieve each value and show it on a grid which is implemented using far point(http://www.fpoint.com/products/spread/spread.aspx).But all this has to be done without the page being refreshed.I use asp.net 2.0 & Ajax Pro.Rememb...