.net-3.5

asp.net 3.5 on windows 2000

Hi, I am trying to get an ASP.net 3.5 site to run on a windows 2000 machine (not my idea!!!) but am having some problems. I have been working through copying required dlls from C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5 into my app bin directory. This succesfully got me past the "assembly not found" errors. However, ...

Snapping / Sticky WPF Windows

I'm looking for solution to add snapping/sticky windows functionallity (winamp-like) to existing WPF application. Same thing as it was asked here, just I need it for WPF. It doesn't have to have docking function, just to snap to border of other windows inside same application and edge of screen (including taskbar) if possible. Preferabl...

How can I change Item and Content Templates based on the object type?

I have a WPF TabControl that I have set the ItemTemplate as well as the ContentTemplate. This tab control displays Call Log information based on customer tech support information. Inside of this same control, I would also like to be able to show a ReturnAuthorization template. I would like to swap these out based on the object type add...

Recommended .Net soft real-time

I'm interested in getting comprehensive information about soft (hard too) real-time application in .Net 3.5/4 Winforms mainly (WPF perhaps). Google results for the thing are quite poor - some quides on parallelism only ... the question is how could I for example write a real-time patient-health monitoring client for some medical applianc...

Another LINQ to XML (C# to VB.NET conversion)

What is the VB.NET syntax for these? Any help converting would be greatly appreciated. var defaultStyleName = (string)doc .MainDocumentPart .StyleDefinitionsPart .GetXDocument() .Root .Elements(w + "style") .Where(style => (string)style.Attri...

Find highest integer in a Generic List using C#?

I have the following List<int> collection and I need to find the highest integer in the collection. It could have an arbitrary number of integers and I can have same integer value for multiple times. List<int> MyList = new List<int> { 3, 4, 6, 7, 9, 3, 4, 5, 5 }; What is the best algorithm to use for finding the highest integer? I a...

How to bind inverse boolean properties in WPF?

I am open to suggestions with the title. It really is pretty bad. What I have is an object that has an "IsReadOnly" property. If this property is true, I would like to set the "IsEnabled" property on a Button, ( for example ), to false. I would like to believe that I can do it as easily as IsEnabled="{Binding Path=!IsReadOnly}" but tha...

Query Entity Framework including records that have not been committed.

Is it possible to query the context, make a change to an entity, and then re-query the context and get a result set back that includes the changed entity without doing a savechanges? (I don't want to savechanges because I may want to rollback) I know I can get the changes back by using GetObjectStateEntries, but I'm interested in the e...

Testing to see if ContentPlaceHolder content has been overridden by a child page?

Hi all, I'm currently migrating a .net 1.1 application to .net 3.5. The .net 1.1 application has a number of number of page + usercontrol's that I would like migrated to masterpages. My issue is trying to test progmatically to see if the masterpage's contentplaceholders content has been overridden by a child page. Is it possible...

UpdatePanel in upgraded project vs new 3.5 project

I can get an UpdatePanel control working(partial postbacks) no problem with a new fresh .net 3.5 project. I've overcome many of the pitfalls that are answered here on this site. (scriptmanager on the page, using triggers, or placing the button within the panel itself.) If I have try to use the UpdatePanel on a project that was origi...

Wpf + Winforms WebBrowser security in Vista

I have a simple WPF app that browses to a web cam. Same issue for winforms app. This works great on XP but fails on Vista ? Looks like IE is doing some sand boxing on vista. With vista the request to install the activeX happens every time but not on XP. Any one know why or how to make it work ? Here is the WPF code. <Window x:Class="W...

Does “Client-only Framework subset" not include client application services?

After recently discovering how insanely long the .net 3.5 framework was to install I searched for and found what I thought was a solution - the 'client only framework subset'. This claims to include WPF etc, all the typical things required by 'Client Applications'. Our application makes use of Client Application Services (see here: h...

Mutable wrapper of value types to pass into iterators

I'm writing an iterator that needs to pass around a mutable integer. public IEnumerable<T> Foo(ref int valueThatMeansSomething) { // Stuff yield return ...; } This nets me "Error 476 Iterators cannot have ref or out parameters". What I need is this integer value to be modified in the iterator and usable by the caller of the...

Some doubts on setting an C#/Asp.Net 3.5 application automatic builder server

I want to set my server to automatically build my application upon commit on SVN repo, then deploy on a test/homologation server. What I planning to do: install a build tool (Nant? use MSBuild?); create a simple script and set a hook to SVN that starts the process of building and deploy. To do that, what I need to install on my serv...

Naming conventions for extension method namespaces and sponsor classes

What naming conventions are you using for namespaces and sponsor classes? (i.e. the classes that hold extension method definitions) Is there a standard/recommended .NET Framework naming convention? (the "Framework Design Guidelines, 2nd Edition" book only gives guidance on what namespaces not to use). ...

How to evolve a .NET codebase over versions of .NET

I have a set of .NET components that were developed long ago (1.1). I would like to continue to provide them for 1.1 for any clients that need that version, but also offer versions - in some cases the same code, in some cases with enhancements - for .NET 2 and for .NET 3(.5). In each later case, I might want to take advantages of newer f...

Fast way to enumerate all files including sub-folders

Does anyone know of a faster way to enumerate through a directory and sub-folders to gather all the files in the enumeration? This is what I have right now: Public Shared allFiles() As String allFiles = Directory.GetFiles(<ServerLocation>, "*.*", SearchOption.AllDirectories) Thanks! JFV EDIT: I am enumerating these files from a ser...

Is there a CLR profiler that works with .NET 3.5 SP1 and WPF?

In all of my searching, I've only been able to find this one link that suggests the old CLR Profiler for .NET 2.0 should work with .NET 3.0 or 3.5 applications. When I try and profile my .NET 3.5 SP1 WPF application with the CLR Profiler for .NET 2.0 it starts up my application just fine, but it throws up a dialog that says "Waiting for...

C# explicit cast string to enum

Hi, I would like to have an explicit cast between from a string to an enum in c# in order to have this : (MyEnum) Enum.Parse(typeof(MyEnum),stringValue) I would like to deport this into an explicit cast operator, I did this but didn't work : public static explicit operator (MyEnum)(value stringValue){ return (MyEnum) Enum.Pars...

Method level security in WCF

HiI want to create a WCF service that have login method, which is authenticating and giving user roles, and depending to that roles, allow or disallow user to call other service methods. Which is the best way to do that? Is there WCF standart mechanism to achieve this?Thanks a lot! ...