I'm writing a very basic WPF dialog and want to apply a simple style to all objects that inherit from the Control class. The code I'm using:
<Window.Resources>
<Style TargetType="{x:Type Control}">
<Setter Property="Margin" Value="20"/>
</Style>
</Window.Resources>
<StackPanel>
<TextBlock Text="some text"/>
<Tex...
Hi :)
Is there any way to make the generated linq classes stay inside a namespace?
The reason being that im working on a big project, and there is alot of tables with different names, and i dont want them to be accessable from anywhere in the project, unless we add the namespace..
I know thats already implemented in the entity framewor...
I need someone more well versed in this area to re-title the question
I am trying to learn more about webDAV and .NET. I have written an app that needs to pull all e-mails from an inbox on the server. I need to load these e-mails into an object that has the following properties:
- From
- To
- Subject
- Body
I found a VERY he...
Is anyone aware of a good managed code .NET component which can do HTML Diffs? I'd like to compare two HTML files and show the differences.
...
After reading (yet another) post by Jeff more or less concluding that us mortal developers shouldn't be getting too involved with encryption, I'm left wondering what library I should be using. The only two libraries I've found that seem legitimate are entlib's and bouncycastle, but they don't seem much more of an abstraction than the .NE...
I know how to enable WCF tracing and view them in the trace viewer tool, but I don't understand what it all means. is there documentation somewhere that explains what each of those levels means and how to make scene of all the information that is being logged.
also what is a good source to learn about a WCF request/response life cycle. ...
I have a method that accepts a parameter obj of type System.Object
Now I want to check if the actual type of obj is:
A collection type (IEnumerable).
Anything else.
The first way I thought of is:
if (obj is IEnumerable)
// obj is a collection
But System.String implements IEnumerable, and I don't want to treat string as a coll...
At work we use a couple of custom columns in the Outlook contacts to serve as an "signout board" so we can see when developers are at another site since we're spread out across a couple of locations. The way this is currently implemented is via a custom view of the contacts that is displayed as a spreadsheet that folks can update their s...
We want to add google analytics a fairly large .NET web site. The site uses several master pages (4 or 5) and so I was going to just paste the requisite javascript into each master page.
<script type="text/javascript">//<![CDATA[
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
...
Hi,
In the following code I'm using 3 foreach statements. I'm just looking to populate a list when a list of items matches another but the ones that don't match also have to be added. So I was wondering if there is an easier way to do the following.
List<T> ds = new List<T>(); //is populated
foreach (var b...
Hi, when I try to click on the designer tab to get the designer view, I get this error:
To prevent possible data loss before
loading the designer, the following
errors must be resolved:
The designer could not be shown for this file because none of the
classes within it can be designed. The
designer inspected the follo...
I have a table in a database that I'm mapping to a main entity class. The table has some columns that hold foreign key values to other attribute tables.
How do I map these to the business classes? Do I create a new class for every attribute table and have the primary class hold these as properties?
...
Consider 2 scenarios where we want to host a .NET web service. Nothing too fancy, simple data types back and forth. They both reference out to an assembly to perform the complex business logic & data access. The project would have a couple .asmx files each with a couple methods apiece.
Web Service Project
When Visual Studio creates th...
I realize a rational knee-jerk response would be "Remoting you idiot! Read the MSDN docs." Every scrap of info I can find concerning .Net Remoting is in the context of inter-process communication: sockets, shared memory, pipes...the classics when it comes to IPC, but an AppDomain is not really a process. However, AppDomains seem to en...
based on my understanding WCF's data contract model was opt-in vs the old opt-out approach of asmx web-services. you have to explicitly include all the fields and types that you require using DataContractAttribute and DataMemberAttribute. my experience however has been different.
take a look at the following examples,
///CASE: 1
///B...
I am loading a page in a webbrowser control. How can i check when its completely done? i know about DocumentCompleted, but one page may call it 5 or many more times. How do i check when its completely done?
...
I recently downloaded the SO Data Dump and was wondering how I could convert it from XML to a DB that I could use in my .NET applications.
...
Hello everyone,
I am using IIS 7.0 to host a simple WCF service. I write it by using VSTS 2008 + .Net 3.5 + C#. The issue is when I access http://localhost:9999/service.svc (I suppose in web browser we can browse the content of WSDL, and I create a new web site which uses port 9999 and run application pool under administrator account), ...
I know .NET has a good asynchronous model for network I/O, which uses completion port under the hood. But all the callbacks are happening on IO threads from thread pool.
Is there any .NET counterparts like Java's selector which deals with multiple streams in a single thread? Or, the thread pool callbacks scale better than this single th...
In my application I have a window I use for plotting debug data. When it loads, I would like to open it "in the background", behind all other windows.
What's the best way to achieve this?
...