Hi,
Is it possible to perform a specific action after the resize event (of the user control), for example when mouse button is released? I need to manually resize an inner control and doing it on every single firing of the event would be quite, hmm, inefficient...
...
I believe this works, I've tested it with multiple concurrent threads (not exhaustively though for race conditions and deadlocks):
public static System.Collections.Concurrent.ConcurrentDictionary<string, item> dict =
new System.Collections.Concurrent.ConcurrentDictionary<string, item>();
public static item dump;
...
forea...
Hi,
I have created a function that has the follwing parameter:
List<Expression<Func<CatalogProduct, bool>>> orderBy = null
This parameter is optional, If it is filled it should create a order by and than by constuction for me, so that I can order the result on the SQL server.
I tried:
IOrderedQueryable temp = null;
...
Using the following steps:
(I have checked this similar post, which does not solve my problem.)
Under Windows Server 2003/IIS6, I create a new site called "testapp"
In VS2010, I create a new ASP.NET MVC 2 application.
I add a view called "Info" with the following code:
<h2>System</h2>
<h3>Request</h3>
<%
foreach (string key...
Hello,
I downloaded a library(SquishIt) I want to use in a Console Application. I am working in Visual Studio 2010 so the Target framework is set to ".Net Framework 4" in the properties of the application. This causes the following error in my code:
The type or namespace name 'SquishIt' could not be found (are you missing a using di...
I just installed .net 4 on my server 2008 and I keep getting
Service Unavailable
HTTP Error 503. The service is unavailable.
messages from any application I try to run as .net 4. The application pool keeps stopping. Event view shows: "The worker process failed to pre-load .Net Runtime version v4.0.30319."
...
Using the following code btn2 looks different to btn1 and btn3 yet they are using exactly the same image.
Public Class MyToolBar
Inherits ToolBar
Public Sub New()
MyBase.New()
Dim bmp1 = New BitmapImage(ImageUri.DeleteItem)
Dim bmp2 = New BitmapImage(ImageUri.DeleteItem)
Dim bmp3 = New BitmapIma...
I'm creating WCF services that return data contract types by mapping Entity Framework types. What is the best place to put the Mapper.CreateMap calls? Should I do it in each service and only for that service, or should I do it on service startup?
Thoughts?
...
Every man and his dog seems to be adding an implementation of LINQ to something.
http://linqtotwitter.codeplex.com/
http://blogs.msdn.com/b/aconrad/archive/2007/12/10/linq-to-rest.aspx
http://linqtowikipedia.codeplex.com/
http://www.codeproject.com/KB/linq/LINQtoCSV.aspx
http://mhinze.com/linq-to-nhibernate-in-10-minutes/
it's even b...
I like the simplicity of the Parallel.For and Parallel.ForEach extension methods in the TPL. I was wondering if there was a way to take advantage of something similar or even with the slightly more advance Tasks.
Below is a typical usage for the SqlDataReader, and I was wondering if it was possible and if so how to replace the while loo...
Hi everyone,
This has been driving me nuts for a week now.
I have a class that looks like this:
public class SuggestionVote
{
public virtual int ID { get; set; }
public virtual Suggestion Suggestion { get; set; }
public virtual User User { get; set; }
public virtual VoteTypeWrapper VoteType { get; set; }
public virtual ...
I've set up a basic http WCF Service and my application in IIS is configured to use Windows Authentication.
The bindings therefore have the following security settings:
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" proxyCredentialType="None" />
<message clientCredentialType="Certificate"/>
...
When a WPF applications starts, it has some standard settings that are applied to determine how text and numbers will look. Is there any way for me to change these default settings programatically?
For instance, the FontNumeralAlignment documentation on MSDN states that a value of "Normal" means that "Default numeral alignment is used"....
Hi,
I have a Tasks table. Tasks are added to this table all the time. After task is finished, I should delete it from the table and perform some other operations. The tasks should be executed concurrently. If I use Task class (Task.Factory.StartNew...), how can I know when Task is finished, in order to perform some operations regarding ...
For example, I have created a button with a check mark drawn on it. I need to use it in a couple places in my window.
<Button Width="25">
<!-- Draw a Green checkmark -->
<Polyline Points="2,5,6,10,13,1" Stroke="Green" StrokeThickness="4" StrokeLineJoin="Round" StrokeStartLineCap="Round" StrokeEndLineCap="Round" />
</Button>
...
Is this possible? I know it is for MS since they have WF activity packs but I'm not sure how it's done. It would be nice to be able to have Activities with Body blocks to insert other activities, buttons, etc. If not too much trouble and/or time consuming that is.
...
EDIT: the GAC issue below may not actually be the culprit. Turns out, even when I create a brand new Console App project and add the .dll directly (so that it lives in the bin), I still can't run it on the sever. Also, I've noted that Console apps are created targeting the .NET 4.0 Client Profile rather than the .NET Framework 4. When...
How am I supposed to upgrade my WPF applications to the Framework 4? Every time I try to change the target framework to version 4, it keeps telling me that WindowsBase, PresentationCore and PresentationFramework aren't in the targeted framework.
This seems to preclude me from using .NET 4, so clearly I'm missing something major here.
H...
I've been learning about DynamicObject in .NET 4.0 and was wondering if this type would be well suited to creating mock objects.
Mocking seems like a great way to use DynamicObject, but am I missing something?
Are there any mocking frameworks that use DynamicObject (as opposed to dynamic proxies or interception) for mocking?
Are there...
I have been studying .NET 4.0 Code Contracts and looking on stackoverflow as well at question regarding this.
I still have never come across any sample code that uses code contracts so that gets me wondering.. is this really useful ? Or maybe its only useful one your code reaches a certain complexity? Anyone out there using Code Contra...