Hi guys,
I'm trying to set the Height of a ComboBox in C#.NET CF / WinCE6.
So far I managed to do it by using the MessageWindow.SendMessage() with CB_SETITEMHEIGHT. The issue is the ComboBox gets to its initial Height when being clicked.
Is there a workaround for this ?
LE: How would this affect performance, considering the ComboBox m...
If I have a method for calculating the greatest common divisor of two integers as:
public static int GCD(int a, int b)
{
return b == 0 ? a : GCD(b, a % b);
}
What would be the best way to attach that to the System.Math class?
Here are the three ways I have come up with:
public static int GCD(this int a, int b)
{
return b == ...
Hi.
We need to dynamically create (i.e. during runtime, via code-behind) UserControls and position them on a Canvas.
We want to bind the position (Canvas.Left and Canvas.Top) and width of those sizable (!) and draggable (!) UserControls to a ObservableCollection<>. That measn when the user drags or resizes the control, the datasource get...
Hi everyone,
I need to build a application that dynamically load custom web user control. Those user controls will be builded by other users and included into a project.
In the other hand, in another project, these controls will be consumed and dynamically loaded into the pages of this project. This is for easily customize forms and st...
According to this question, there's no built-in way in EF v1 to figure out the length of a field. Is there a built-in way to do so in the Entity Framework that ships with .NET 4, if so - how?
...
Any help will be appreciaded.
...
We were discussing this the other day at work and I wish there was a Stackoverflow question I would point people at so here goes.)
What is the difference between a Double and a Decimal?
When (in what cases) should you always use a Double?
When (in what cases) should you always use a Decimal?
What’s the driving factors to consider in ca...
it seems that my code adds 6 bytes to the result file after encrypt decrypt is called..
i tries it on a mkv file..
please help
here is my code
class TripleDESCryptoService : IEncryptor, IDecryptor
{
public void Encrypt(string inputFileName, string outputFileName, string key)
{
EncryptFile(inputFileName, outputFileName, ...
I hear much talk about memcached, but when briefly studied on it, I couldn't understand what advantages I can take instead of using the good old Dictionary<string, object> to cache my data in my applications.
Can someone explain it to me?
...
How to filter DataView/DataTable by time? I have a table with datetime column inside and I need to filter by the time that is inside that datetime value. In native SQL it's not so hard but in ADO.NET Expressions it makes a dificulity for me.
...
I want to retrieve the majority color in a background image in .NET. Is it possible?
...
I'm trying to page and sort my datagrid wich is inside a modalpopupextender but I can't page it in any way, already tried with , put the updatepanel inside, outside, in the middle (loL) and it does NOT work. modal popup does not get closed but the grid just dissapear. Code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As Sy...
I have a windows service which uses the ServiceHost class to host a WCF Service using the net.tcp binding. I have done some tweaking to the config to throttle sessions as well as number of connections, but it seems that every once in a while my "Calls outstanding" and "Call duration" shoot up and stay up in perfmon. It seems to me I ha...
I am creating a numeric TextBox in WPF, with two buttons to increase and decrease the value.
I have create two RoutedCommand to manage the behiavor and they are working well. There is only one problem that I would like to solve. I would like that the control notifies all object binded to its TextProperty when an increase or decrease com...
Scenario
I have the following methods:
public void AddItemSecurity(int itemId, int[] userIds)
public int[] GetValidItemIds(int userId)
Initially I'm thinking storage on the form:
itemId -> userId, userId, userId
and
userId -> itemId, itemId, itemId
AddItemSecurity is based on how I get data from a third party API, GetValidItemI...
Is there a way to dynamically change the WebResponseFormat on a method given a parameter passed by the client? I default my WebResponseFormat to XML, but I want to give the client the opportunity to specify a format as JSON or XML and if none is specified, default to XML.
Currently I am doing the following:
[WebGet(UriTemplate = "objec...
Update: The service-based answers below are most likely the way to go, I am also curious to see if there are any out-the-box solutions anyone has tried in the field.
Our system uses a client-server architecture, and with more clients using it I'm thinking of better ways to log client application errors, and get them sent to us.
Curr...
I have written a restful web service in c# and .net using the Restful Starter Kit that receives a mime multipart form via a stream.
The multipart form contains a small xml fragment and a small file binary.
I have read the stream in, and I have also written some code to parse the data to obtain the XML and the file binary.
However, I f...
I have an old .net 2.0 windows app I need to deploy on a windows 7 machine and its not going too well. I want to build a native 64 bit version rather than a 32bit capable of running on a 64bit environment. I'm working with Visual studio 2005
My question is what settings do I need to set within each project of my solution, (both the wind...
A "Silverlight-enabled WCF service" was added into existing ASP.NET web-application. On attempt to add reference from the Silverlight Application to the service the following error was received:
Object reference not set to an instance of an object.
How can I add reference?
Thanks.
...