.net

Triggers collection members must be of type EventTrigger

I've created a UserControl, similar to the following: <UserControl> <StackPanel Orientation="Vertical"> <StackPanel x:Name="Launch" Orientation="Horizontal" Visibility="Collapsed"> <!-- Children here --> </StackPanel> <ToggleButton x:Name="ToggleLaunch" IsChecked="False" Content="Launch" /> ...

Reserve screen area in Windows 7

Is it possible to reserve a screen area near an edge of the screen for your app in Windows 7? It would behave similar to the Windows taskbar (i.e. maximized windows would not overlap with it). I'm writing a taskbar app with proper support for multiple monitors. The primary purpose is to show a taskbar on each screen containing only the ...

C# XMLDocument to DataTable?

I assume I have to do this via a DataSet, but it doesn't like my syntax. I have an XMLDocument called "XmlDocument xmlAPDP". I want it in a DataTable called "DataTable dtAPDP". I also have a DataSet called "DataSet dsAPDP". - if I do DataSet dsAPDP.ReadXML(xmlAPDP) it doesn't like that because ReadXML wants a string, I assume a file...

Setting Autoscroll true makes focus lose in .net datagrid

I have a huge datagrid control embedded in a window and Autoscroll property to true. Control also has textboxes in addition to the grid .This grid is meant for monitors with resolution above 1600(and so scrollbar not visible at that resolution). But Autoscroll property is set to make incase user uses it in smaller monitors also. Working...

Is Microsoft ASP.NET Dynamic Data website a platform i can trust for making websites admin areas?

Did you used Dynamic websites before? you see its a good way for making fast admin areas for our websites? Is it easy to customize? Is it easy for the end user to manipulate? I am thinking to use it with a client and didn't use before, can you advice? ...

LINQ to Entities Entity Initialization

In the tutorials for ASP.Net MVC, the LINQ to Entities code looks like: public class MyController : Controller { private Models db; public ActionResult Index() { db = new Models(); var foo = (from f in db.foo select f).ToList(); return View(foo); } } I'm guessing this has something to do with t...

Error Logging: Source Error and Source File

When developing a .Net web application, if a run time error is generated, it shows some "extra" debug information that I can't find in the Exception class. It shows a "Source Error" section which shows a code excerpt with line numbers showing exactly where the error was generated and it shows the "Source File", the actual page that thre...

Why does C#/CLR not support method override co/contra-variance?

There are quite a few questions & answers about hacking around the limitation of C# not allowing method return (and argument) types to be changed to compatible types on overrides, but why does this limitation exist, either in the C# compiler or in the CLR? As I an see, there is nothing that could break if co/contra-variance was allowed, ...

Event on datarow being read or accessed?

I'm looking for a method or an event that would get fired when a row in a datatable is accessed. I have a datatable with several thousand rows, and an image in at least one of the columns. I want to dynamically load and unload the image from the row when it gets accessed. I haven't seen any documentation that suggests that it's there, ...

Protocol Buffers: Should I use int64 or fixed64 to represent a .NET DateTime value?

I need to serialize a .NET DateTime value in a protocol buffers message. My plan is to use the DateTime.ToBinary() and then pass the 64-bit returned value in the message. But I'm not sure what to choose as a protocol buffers data type to represent that. I guess I'm confused about when the fixed64 (or sfixed64) data types should be use...

What is the best open-source .NET(C#) blogging software

Are there any reasonable complete open-source C# .NET blogging engines out there? Something a budding programmer may be able to extend? MVC Ideally. ...

where should datasets reside in a n-tier (multi layered) architecture?

We are currently havin a discussion if dataset should go in the data or business layer? My friend thinks all ADO.NET components should go in data layer. For me this does not seem right for the followin reasons: If you create a fat Data Layer Client, it will be much more difficult to for example migrate everything to a different dat...

How To: WCF with Transport Security+Server Cert Auth. WITHOUT Client Cert?

Am I correct in understanding that a WCF Service could be setup with "Transport Security", + "Certificate Authentication" and without a "Client Certificate" installed client side? My scenario would be: WCF Services on Remote Server Windows Forms Client shipped potentially to hundreds of users (authenticates users (against DB) and per...

What is the offical terminology for the basic .NET objects in C#

What is the official term for the basic object types available in the C#? I am creating API documentation and I need to explain any that one property of my API will accept any basic C# object (string, Int32, etc.) and it will not accept any complex data type (struct, class) ...

Call Routine in Access Module From .Net?

I am having trouble automating Access 2007 from .Net, either VB or C#. All I want to do is call a subroutine in an Access module from .Net. Ultimately, I have to make it work in VB, but I've been trying both with the same results. Below is the code in my VB test form. It results in the error: System.Runtime.InteropServices.COMExceptio...

directory services group query changing randomly

I am receiving an unusual behaviour in my asp.net application. I have code that uses Directory Services to find the AD groups for a given, authenticated user. The code goes something like ... string username = "user"; string domain = "LDAP://DC=domain,DC=com"; DirectorySearcher search = new DirectorySearcher(domain); search.Filter = "...

How to generate thumbnail from .eps and .ai files in .NET?

A potential client is asking me if I can generate a thumbnail image from .eps and .ai files. The standard .NET Image class is not able to do this, so I suppose I need a 3rd party API, but I am not sure what is the best approach. Any ideas? Roger Gallery Server Pro ...

Is there a shortcut in VS for "next statement in current thread" ?

When debugging multi threaded .NET apps in VS (2008) I frequently want to step through code. When I press F10 quite often I find VS jumping to a statement in another thread. Its really confusing and always throws me off. I can work around it by chucking in a million breakpoints. Is there a cleaner way of asking VS debugger to go to t...

XML Deserialization of a date with an empty value

I'm getting a xml file from one vendor that has some "empty" dates like this: <UpdatedOn/> <DeletedOn/> By doing a regular deserialization it fails with: Inner Exception: System.FormatException: String was not recognized as a valid DateTime. Any ideas how to deal with this ? My fields are already marked for a default DateTime: ...

Handling end process of a windows app

Is it possible to capture the task manager end process of a windows application within the same windows application itself? I am using a C# 2.0 win app and I would like to do some database processing (change a flag from 'Y' to 'N' in the DB) when an end process happens. ...