If I press the mouse on an item of a ListBox and then move the mouse without releasing the mouse-button over another item, the selection automatically changes to the element that is under the mouse.
Is there a possibility to disable this behaviour, so that the selection is only changed when the mouse has been pressed directly over the ...
I set up a nice ColorAnimation.
When applying AutoReverse = true to it, it even goes from one color to another.
Now I want it to change the color it animates to randomly after every completed runthrough.
How can I achieve this?
btw. I'm attaching my Animation to a storyboard:
storyboard.RepeatBehavior = RepeatBehavior.Forever;
storybo...
I created a few ColorAnimations and want them to run at the same time (whether they run syncronized doesn't matter).
Sadly only one of them runs.
storyboard = new Storyboard();
//Animation Auditorium
ColorAnimation SpotLightAnimation = new ColorAnimation();
SpotLightAnimation.To = Color.FromArgb(1, Conver...
How do I display a literal curly brace character when using the String.Format method?
Example:
sb.AppendLine(String.Format("public {0} {1} { get; private set; }",
prop.Type, prop.Name));
I would like the output to look like this:
public Int32 MyProperty { get; private set; }
...
In a client-server application how can the server know that a request comes from a genuine application and not from a tampered copy of it?
I still haven't developed neither the client nor the server application. The solution may be plain socket, wcf, IIS hosted or whatever.
...
Anyone knows the default value for enums using the default keywords as in:
MyEnum myEnum = default(MyEnum);
Would it be the first item?
...
Is it possible to make the background of a LinkLabel transparent?
Setting the BackColor to the Transparent system color does not work.
Matching the BackColor of the container is not suitable because the container is an image.
...
I'm coding an application on C#, and it runs perfectly fine when I click the "Run" button in Visual Studio C# Express 2010. But, when I go to Debug -> Build Solution, after I run the .exe file, it says "XXX.EXE has stopped working..."
I have inserted break-points and commented out chunks of my code, rebuilt the project, and ran again to...
This may be a question that others have seen, but I am trying to find the best language for concurrent programming that can run on the .net platform.
I have been doing side development in erlang to get a feel for the language and have loved how easy it is to get a stable concurrent or even distributed system up. It led me to scala wh...
Hi Dear,
I am dealing with SQLite with .net environment.
When I use a TableAdapterManager to update a dataset, which is designed in the visual studio and contain "RowState is Deleted" rows, the ConcurrencyDBException occurr.
If I go to the dataset designer and disable the optimistic concurrency option, it will works.
But I don't want...
Recently I read in an article that the Approach 1 following is more preferred/advantagious than Approach 2, while designing OperationContracts in WCF.
Approach 1
[OperationContract()]
ResponseMessageType SomeOperation1 (RequestMessageType reqMessage);
Approach 2
[OperationContract()]
string SomeOperation2 (string parm1, string parm2...
Hi folks,
i've got the following code :-
while (....)
{
var foo = DoTheFooShakeShakeShake(..);
foos.Add(foo); // foos is an IList<Foo>, btw and is new'd, above.
if (foos.Count % 100 == 0)
{
var e = new CustomFooEventArgs { UserId = whatever, Foos = foos };
OnFooPewPew(this, e);
foos.Clear();
...
Hey!
Have gotten the foundation in place, but now, finding myself wanting to play around with my
application's user's profile pictures; I'm stumped....and have been for quite some hours...
Firstly, my oauth_token / access_token is obtained, using the official (though Alpha ;-)
Facebook C# SDK and only utilize the Graph API.
FBap...
When I debug my VB.NET application in Visual Studio 2010, in the debug output it says a few things that I don't understand:
'something.vshost.exe' (Managed (v4.0.30319)): Loaded 'jb3yjswu'
'something.vshost.exe' (Managed (v4.0.30319)): Loaded 'mdul5h2c'
What are these random modules (or something else) that get loaded? Are they relat...
Hi folks,
We have a simple Table per Type Entity Framework 4.0 model :-
ALl classes are all POCO's.
Post class is abstract.
Discussion and List are classes are concretes, that inherit's from Posts (as shown in the diagram).
When we try to save a Discussion, we do the following code :-
Posts.AddObject(discussion);
And the Sql Ser...
I'm using a 3rd party library which requires a static method to be invoked before it is used - it sets the serial key to validate the license for the software. I'm needing to use this library in multiple projects and I want to shield those projects from needing to worry about this license. Ideally, I'd like to create a shared assembly ...
What is the fastest way of getting a file length in .net?
Note: I am accessing files via a network share.
So far I have
1.5ms FileInfo.Length
.5ms FileStream().Length
...
There is an external secure service that I am consuming in my .net class by making a web reference to it and passing it the username token like so:
MyWebService objWS = new MyWebService();
UsernameToken token = new UsernameToken("User","Password", PasswordOption.SendPlainText);
objWS.RequestSoapContext.Security.Timestamp.TtlInSeconds = ...
this is a second part to my first question posted here...
http://stackoverflow.com/questions/3757185/linq-query-after-where-statement-not-returning-relationship-data
What Im trying to do is use linq to represent this data...
Get My Friends' Favorite stores, where store is an object that contains a list of the friends who also have fav...
I recently came across a problem with My.Computer.FileSystem.DeleteDirectory(). It will not delete read only files.
I found out by Googling that I could delete the read only files by changing the file attributes to 'Normal'. So I wrote a recursive function, as below.
Private Sub DeleteDir(ByVal dir As DirectoryInfo)
For Each d In ...