.net

Dynamically change selected row's style in SilverLight DataGrid.

Hi Guys, Is there any way so that we can provide style to the Selected Row in DataGrid (SilverLight). I am able to handle SelectionChanged() even but there I found SelectedItem (BusinessObject) not Row so that I could provided it required backcolor/Forecolor. I tried to achieve it by binding RowBackColor property of DataGrid with a con...

ServiceModel and f#

Hi, I am just starting with f# so the question may seem easy for some of you. so, I am trying to use SyndicationFeed which is located in System.ServiceModel.Syndication namespace. I added following references: System.ServiceModel and System.ServiceModel.Web to the project. The result is that it builds successfully, but when I switch to ...

LINQ - Include Child Property of Child Property

I have a child property of a child property in my entity. I have a Get method as such: List<T> Find(Expression<Func<T, bool>> where, params Expression<Func<T, object>>[] toInclude); The way I normally load just the first child property is to do this: myManager.Find(x => x.Id == id, x.ChildB); However, I would like to ...

Visual Studio 2010: Automation/Packages/Macros, what to use?

Microsoft seems to have little discoverable content on the differences between all the different kinds of Visual Studio extensibility. The closest thing I've found to a description of the differences was an MSDN page that had a general "when to use which" list that could have been summed up with "it depends" for all cases. I am curious ...

Console application fire a process then close itself

Hi all! :-) I'm writing a small updater for my app. My flow would be like this: app.exe -> call process(updater.exe) -> app.close() Then, updater check if app is closed, then overwrites app.exe and other satellite assemblies. So I need to do something like this: launch my C# exe app, fire a process for updater.exe, then close app, but ...

How to overlay WPF Control at specific location

I have a FlowDocumentPageViewer that I use to display a multi-page document. I want a small control to appear next to certain paragraphs in the document which the user can do certain interactions with the paragraphs. The control should not appear when the paragraphs are not visible. I have the coordinates of the Point where I want to di...

MySQL Date format Question

How do i convert 06 Aug 2010 03:41:44 GMT+00:00 to mm/dd/yy time in mysql? I basically want to sort this SentDate column (the data is populated from an external source). I am ok to do this in c# also. ...

Programmatically edit the end point of a web service

Is there a way I can programmatically change the <endpoint address="..." /> value of a web service? In my app.config file, I have the following code: <system.serviceModel> <bindings> ... </bindings> <client> <endpoint address="http://dev.remotedomain.com/WebServices/WebService.asmx" binding="basicHttpBindi...

Why is ServiceKnownType not needed for my object?

It is my understanding that every type (other than some primitives like int and string) used in a WCF ServiceContract need to be declared with ServiceKnownType attribute. But, I have build a custom object and it is transmitted accross my WCF service with no problem -- even though I have not added a ServiceKnownType for it. Will someone...

Localization using multiple resx files

My web application is handling localization via resource file placed in a satellite assembly using ResourceManager. Since the application is growing I would like to split resx file into multiple files (for each language), but on the client side, seems that I have to create a ResourceManager instance for each file that I want to read from...

Using uniqueidentifier SQL column type with Entity framework

For my primary key and identity in our Clients table I use uniqueidentifier column with a default value set to newsequentialid(). Inserting new rows through the management tool creates the values for the ID fine. Inserting from .NET 4 code via EF results into zero GUIDs (00000-0000....) being inserted. I create the entity with new, set...

How to debug in clr.dll or mscoree.dll

I followed these steps to be able to debug in the .Net framework code. This work well for some parts of the framework (for example for System.Drawing.dll), but not for other parts (clr.dll, mscoree.dll, ...). This seems a bit strange to me since the code in these dlls was released by Microsoft (at least the parts I see in the call stack...

Login to Sharepoint from ASP.NET site

I have a preexisting asp.net site that uses forms authentication. I am setting up a Sharepoint 2007 site on the same box. I would like to use my existing asp.net site authentication and once logged in provide a link to the sharepoint site that has the user auto-logged in. It doesn't matter to me if Windows or Forms auth is used. I tr...

How to Update DataRepeater Bound Datasource without flicker

Hi, I have a list bound to a datarepeater which contains data being scrapped off a web site. Because the scrapping process could take some time, I binding the list to the datarepeater at the outset so the user can start seeing the results. As I add entities to the list, I'm calling: bindingSource.CurrencyControl.Refresh(); This is cau...

Not fire button event after attribut adding window open, how to trigger both?

button1.attributes.add("onclick", "window.open(....)") button_click(object sender, eventargs e) not run How to make button click trigger when opening a new window? ...

When to replace RDBMS/ORM with NoSQL/DocumentStore

I've looked at MongoDB/norm (but want a general document-oriented store answer). It seems really nice to work with and I'm interested in knowing when it should be used instead of RDBMS+ORM? What should i use for for instance: Stackoverflow similiar sites Social communities forums (I posted another more general question but it got a...

LINQ DataTable Sum In Where Clause

I'm having a rough time figuring out exactly how to do a LINQ query on a DataTable and return a full row while having the WHERE clause test on a sum. My code: transactionsToRemove.AddRange(paymentTransactionResults .AsEnumerable() .Where(...) .GroupBy(r => (decimal)r["AccountNumber"])); There are multiple transactions ...

How to get taskbar background color

Hi I have notifyIcon located at the notifyArea of the Win7 taskbar. This Icon contain dynamic text info - Black text on the trasparent bitmap. So, with Standard Windows theme (light) information readable but with other "dark" windows themes not. I want to get taskbar background color and eventually draw Icon with appropriate color (ex...

How can in inject a literal expression using Reflection.Emit?

I am working on a project to evaluate tokenized user-defined expressions of varying complexity, using C# as the scripting language. I have a working model using CodeDOM and reflection to generate an evaluator class, create and load the assembly (GenerateInMemory = true), instantiate the class, and Execute the evaluate method. However, ...

AntHill? How to add a project to the hill?

Anybody use AntHillPro for auto builds? If so, I'm curious how you add a .NET solution/ project to the hill (to be compiled along with everything else, etc.) This is one of those "had to be done yesterday" things but no one on my team understands how to do this (I'd expect it to be the most basic question anyone would ask when you use...