I have created a custom panel (MyCustomControl) that can contain other controls and be configurable through dependency properties. Inside a different user control (MyUserControl), I have multiple instances of MyCustomControl configured in XAML.
Outside of the user control, I am trying to bind an ItemsControl (myItemsControl) to the l...
Below is my message filter:
bool MyFilter::PreFilterMessage(Message %m){
switch(m.Msg){
case WM_CLOSE:
case WM_DESTROY:
case WM_NCDESTROY:
case WM_QUIT:
Debug::WriteLine(L"Gone!");
break;
case WM_MOUSEMOVE:
Debug::WriteLine(L"A mouse! Catch! Catch!!! CATCH!!");
break;
}
return false;
}...
I want to have client-side validation for quick response to the user without a roundtrip to the server.
I also want the same validation for securing the code behind action on the business and data access layer.
How do you reuse that kind of code pragmatically in ASP.NET?
(note: ASP.NET, C# 3.0, .NET 3.5, Visual Studio 2008)
...
I have four projects:
cv
cxcore
highgui
TemplateMatching
The project dependencies:
project cv depends on cxcore
project highgui depends on cxcore
project TemplateMatching depends on cv, cxcore, highgui
but there are still some errors:
Build started: Project: highgui, Configuration: Debug Win32
.....
LINK : ....\b...
EDIT: I am only accessing 1 database but a DTC transaction IS being created. I can see it in the DTC Transaction List GUI (Component services plugin). Why is this?
I need to perform a transaction (several insert commands) against 1 database.
Should I be using TransactionScope or IDbTransaction (connection.BeginTransaction)?
Transacti...
I've been wrestling with Project Euler Problem #16 in C# 2.0. The crux of the question is that you have to calculate and then iterate through each digit in a number that is 604 digits long (or there-abouts). You then add up these digits to produce the answer.
This presents a problem: C# 2.0 doesn't have a built-in datatype that can ha...
Hi, I have a windows application connecting to Database to read some data. Since the database is setup for resilience, my application needs to connect to one of the two databases. Can someone specify the what the syntax would be to specify the failover partner in a connection string using sql server authentication.
Any help is greatly a...
Seeing something strange between a Java web service and the .NET client talking to it. We are sending an object back and forth with a DateTime property on it. Sort of like this (generated from the WSDL):
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.SerializableAttribute()]
[System.Diagnostics.Debugg...
A LinqToSQL Context class is annotated with DatabaseAttribute by default. It is optional however. In any scenario I can think of you would use the connection string to point at a database, so what's the reason for it.
Now, I've obviously read docs. which state, you use it to specify a default database if you wish to omit it from the conn...
I have a Windows service that runs as mydomain\userA. I want to be able to run arbitrary .exes from the service. Normally, I use Process.Start() and it works fine, but in some cases I want to run the executable as a different user (mydomain\userB).
If I change the ProcessStartInfo I use to start the process to include credentials, I sta...
I have written the folllowing regex and would like to get empty strings removed automatically and could not find any equivalent to RemoveEmptyEntries for Regex which I found only for the Split method in string.
string test = "{ key1 = { key2= xx } | key3 = y | key4 = z }";
string[] help = Regex.Split(test, "(=)|({)|(})|(\\|)");
...
Can anyone recommend some good online resources that show samples of what would be considered good Winforms "design" in terms of both User Experience and overall aesthetics. I'm looking for something that includes screenshots so as to inspire me..... not just a bullet list of best practices. Thanks!
...
I what to draw a circle that uniformly fits into its space, with a constant a stoke thickness. A ViewBox gets me the uniform fit, but not the constant stoke thickness.
<Viewbox Stretch="Uniform" MinHeight="10" MinWidth="10" >
<Ellipse Height="10" Width="10" Fill="Red" StrokeThickness="1" Stroke="Yellow"/>
</Viewbox>
...
I am currently writing a small application in Windows Mobile using CF.NET.
The application is very similar in its behaviour to an e-mail application i.e. I am using POP3 to download messages and attachments from my mail-server account to store on the storage-card for further processing with a MIME-tool.
My problem is downloading large ...
Is it possible to instruct the aspnet_compiler to set debug=false in the web.config?
My intention is to automate this as part of the nant build process. I am open to suggestions other than xml parsing
...
I'm looking for production quality OpenSocial/Shindig .NET library, both Container and Client.
I only found Baadal (and a dead project on CodePlex). What are you guys using?
...
Hi,
I want to do my own action on tap (click) to close button ( X in right top corner ) in compact framework appliaction. I'm using Windows Mobile 6.1.
Usualy I want default behaviour, but sometimes I want to change the usercontrol on current form. How can I reach it?
Thanks!
...
I have a method that creates a virtual directory. How can I set the .Net framework to version 2 while I create the virtual dir?
My method looks like this so far:
private static void CreateVDir(string metabasePath, string vDirName, string physicalPath)
{
// metabasePath is of the form "IIS://<servername>/<service>/<siteID>...
When iterating through an array using foreach, are there any guaranties that the order in which the elements are returned is the order array[0], array[1], array[2], ...
I know this is how the Array class is implemented now but are there any guaranties for future versions of the framework? The same questions goes for List<>.
...
I have the following method signature:
public void MyFunction(Object[,] obj)
I create this object:
List<List<Object>> obj = new List<List<Object>>;
Is there an easy way I can convert this to an Object[,]?
UPDATE:
The fact is I like to use Lists because I can easily add a new item. Is there a way I can declare my List<> object t...