.net

Is there OnLoad event for C# libraries?

I want to initialize my C# library as it loads by another process, is it possible and if so - how? ...

How to know if a graphics card provides hardware rendering for wpf

I have to run a wpf-app in an environment that has all the same dell-pc's with an intel gma 3000 graphics chip (onbard, Q963/Q965). The app renders only with software rendering (Stated so by the RenderCapability.Tier-property and also Perforator of the Performance Toolkit Shows that. On all of this machines, DirectX 9c is installed and...

about TranslateTransform and RenderTransformOrigin

Hello everyone, I am using Silverlight 3.0 + .Net 3.5 + VSTS 2008 + C# to silverlight application. I want to learn TranslateTransform and RenderTransformOrigin, could anyone recommend me some tutorials? I am a newbie of this area. And I did not find anything which is good to learn for a newbie from MSDN (correct me if there are some go...

Project management: Implementing custom errors in VS compilation process

AGAIN: If you're voting -1, please leave a comment explaining why. This post isn't about whether or not you approve if this approach, but how to go about it. Like many architects, I've developed coding standards through years of experience to which I expect my developers to adhere. This is especially a problem with the crowd that beli...

.NET implementation of planarity testing

Is there any .NET implementation of any planarity testing algorithm like Boyer-Myrvold's or anyone else? I looked through the web but I didn't manage to find ...

How can i call method from class but this method implemented from any interface?

i try to call base.Alan(); in HacimBul. But base. dont give intellisense alan method public double HacimBul() { throw new Exception(); //return base..... --> how can i see base.Alan(); } namespace interfaceClass { class Program { static void Main(string[] args) { ...

Issue with child of custom Decorator class in WPF

I need a custom border that renders a little differently than a normal border. I made a class that inherited from Decorator as follows class BetterBorder : Decorator { protected override Size ArrangeOverride(Size arrangeSize) { return arrangeSize; } protected override void OnRender(DrawingContext dc) { ...

UI updates not happening in the expected order

I have a Panel which hosts a number of child controls in a grid layout. The child controls each consist of a Panel with a PictureBox and a Label. When one of these child controls is clicked it becomes "selected" (which basically entails changing its background to a different color) and an event is fired. In the handler for this event,...

Building 'flat' rather than 'tree' LINQ expressions

I'm using some code (available here on MSDN) to dynamically build LINQ expressions containing multiple OR 'clauses'. The relevant code is var equals = values.Select(value => (Expression)Expression.Equal(valueSelector.Body, Expression.Constant(value, typeof(TValue)))); var body = equals.Aggregate<Expression>((accumulate, equal) => Exp...

CLR: Multi Param Aggregate, Argument not in Final Output?

Why is my delimiter not appearing in the final output? It's initialized to be a comma, but I only get ~5 white spaces between each attribute using: SELECT [article_id] , dbo.GROUP_CONCAT(0, t.tag_name, ',') AS col FROM [AdventureWorks].[dbo].[ARTICLE_TAG_XREF] atx JOIN [AdventureWorks].[dbo].[TAGS] t ON t.tag_id = at...

is Windows Installer Redistributable package necessary for deployment using inno setup ?

Hi all, Im a .Net beginner. i need to ask something. if i want to deploy my .net winform application (use 3.5 sp 1) using inno setup. do i also need to deploy Windows Installer Redistributable package for each user's pc. Is it mandatory ? thank you. ...

What font should I use in Visual Studio 2010 when giving a presentation?

Scott Hanselman suggests using Lucida Console, 14 to 18pt, Bold for the Visual Studio font when presenting. But that's a post from 2003, and I think I remember hearing that there was a better font in VS 2010. Is it Consolas? What font/size should I use when giving a presentation? ...

Eclipse for .Net developer

In Eclipse, what is a "Package" explained in .NET terms? ...

How to create File with the FILE_ATTRIBUTE_TEMPORARY in C#?

How to create File with the FILE_ATTRIBUTE_TEMPORARY in C#? (So to store Data in Ram but be able to use it as normal file) ...

Determine whether .NET assemblies were built from the same source

Does anyone know of a way to compare two .NET assemblies to determine whether they were built from the "same" source files? I am aware that there are some differencing utilities available, such as the plugin for Reflector, but I am not interested in viewing differences in a GUI, I just want an automated way to compare a collection of bi...

C# .NET How can I show an image on WebBrowser control?

How can I show an image on a webbrowser control in C#/.NET? I'm doing something like webBrowser1.DocumentText = "<html><head></head><body><img src=imagelocationURL.png/></body></html>" but the image doesn't appear. What am I doing wrong? ...

.NET Lambda Pass Method Parameter

Hi All, I hope i'm missing something obvious, but I'm having some troubles defining a method that takes a parameter of a method to fetch the method information for the passed method. I do NOT want actually execute the method. I want to be able to do: busObject.SetResolverMethod<ISomeInterface>(x=>x.GetNameById); Where GetNameById ...

Writing a managed wrapper for unmanaged (C++) code - custom types/structs

faacEncConfigurationPtr FAACAPI faacEncGetCurrentConfiguration( faacEncHandle hEncoder); I'm trying to come up with a simple wrapper for this C++ library; I've never done more than very simple p/invoke interop before - like one function call with primitive arguments. So, given the above C++ function, for example, what should I ...

MEF Constructor Parameters with Multiple Constructors

Hi, i starting to use MEF, and i have a class with multiple constructors, like this: [Export(typeof(ifoo))] class foo : ifoo { void foo() { ... } [ImportingConstructor] void foo(object par1) { ... } } i am using catalog.ComposeExportedValue() when composing to suply the par1 value to 2nd constructor: ... catalog.ComposeEx...

OpenFileDialog.AutoUpgradeEnabled doesn't work under Vista or 7?

If I specify OpenFileDialog.AutoUpgradeEnabled = true, my program still shows the old XP-style dialog. Any idea why this would happen? This is after I enable theming in Main() [STAThread] static void Main() { Application.EnableVisualStyles(); Application.Run(new Primary()); } and this is my dialog code: private void OpenProgr...