I am currently doing this, but I am doing something wrong :):
<Style TargetType="{x:Type Button}">
<Setter Property="MinWidth" Value="90" />
<Setter Property="Width" Value="Auto" />
</Style>
I want the buttons to have some minimum width but also to have their width expand to fit the text of the button.
...
Hi,
In C#/.NET (on Windows) is there a way to read a "growing" file using a file stream? The length of the file will be very small when the filestream is opened, but the file will be being written to by another thread. If/when the filestream "catches up" to the other thread (i.e. when Read() returns 0 bytes read), I want to pause to all...
Let's say I have a stored procedure in Microsoft SQL Server 2005 that returns a list of values (1 column result set). I want those list of values appear in Infopath (i.e. they are the values of say a dropdown list). How would I do that?
Let's say that I would also use other stored procedures for other dropdown lists.
Let's say I can a...
I have the following connection string, and you will notice "Provider's.Tests", notice the single quote, how do I enter this in to the web.config to make it valid?
<connectionStrings>
<clear/>
<add name="Provider" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename="C:\Projects\Provider's.Tests\app_data\db.mdf";Integrate...
Well, it works on my own computer where I have visual studio installed. I install the exe file with installutil and the service works fine. But when I install it on another computer where only the framework is present, I still can install it with installutil BUT I can't start it. I get something along this Could not start the Search serv...
Hello everyone,
I need to use some certificate on IIS 7.0 web server to test my https code at client side (console application). I have created self-signed certificate and it is fine. Now I want to test with formal certificate which IE could recognize, like certificates from verisign or other formal certificate issuing companies.
Any e...
I've seen many questions on SO about .NET 3.5 advantages, but these are more leaned towards language features and easier development. Are there any non-developer-wise advantages for using .NET 3.5? Bugs, fixes, advantages over time?
Background:
Desktop application that works in conjuction with a device driver.
We wanted to support ...
Having this code...
var b = new ReadOnlyCollection<int>(new[] { 2, 4, 2, 2 });
b[2] = 3;
I get a compile error at the second line. I would expect a runtime error since ReadOnlyCollection<T> implements IList<T> and the this[T] have a setter in the IList<T> interface.
I've tried to replicate the functionality of ReadOnlyCollection, bu...
I have a adaptive server anywhere network server(version 7.0),it's name is "TestServer".
Now, Client want to connect this server using OdbcConnetion in DOTNET,How to set the connection string ?
...
Has anyone had experience of or got any knowledge about the VFP to .Net Compiler?
I'm working for a company with an extensive range of VFP9 applications and they are looking for a quick way to get apps running in .Net. I've been asked to check out this compiler to see if it is a viable option but so far I haven't been able to get it to ...
Hi Guys,
I posted a question re LDAP account management, but after exploring this, it's not what i'm after. I've managed to find two ways of creating users on a machine, and i find one is much neater than the other, however, i am uncertain how to convert the first option over to the second option entirely.
This was my first solution:
...
I have List I want to sort Desc by Priority, which is int and can be anything from 0 to 100.
I use GenericComparer, which allows to set the SortDirection and sortExpression. Works well for any string property, like a Name (which is property of ProductLowDetail). However for Priority it behaves strange. It does sort, but it changes the di...
Hi,
I am having troubles with one of our applications. It's .NET 3.5 32 bits process. Upon startup we open a .mdb to read a few "metadata" values. This works on hundreds of systems, but we have a customer with a TabletPC and problems. The operating system is Windows XP Tablet PC SP3, 32 bits, bla bla. Nothing unusual. It has .NET 3.5 (f...
I've got code as follows:
var smtpClient = new SmtpClient("my.mail.server");
smtpClient.Send(mailmessage);
however the send method call fails with a "the remote machine actively refused" exception message. I know that there's no firewall blocking cuz I can telnet to the same addresse and manually work the Smtp protocol through with th...
One thing I have never truly understood is the concept of character encoding. The way encoding is handled in memory and code often baffles me in that I just copy an example from the internet without truly understanding what it does. I feel it's a really important and much overlooked subject that more people should take the time to get ri...
I would like to parse an assembly qualified name in .NET 3.5. In particular, the assembly itself is not available, it's just the name. I can think of many ways of doing it by hand but I guess I might be missing some feature to do that in the system libraries. Any suggestion?
...
I've written a .NET DLL which is called from another application using COM interop. I'd like to use log4net, but I need to specify the location of the log file at runtime from the other application.
I've always used log4net in the simplest possible way for WinForms project, but since a DLL project doesn't have an app.config, and my cal...
I'm looking for reading object type bind to BindingSource.
In debugger mode I've drilled down BndingSource object and I've found non-public property named "BindType" what contains interested info.
(Also found property "ItemType" what contains also such info - but I'm not sure it will work if BS.Count == 0)
Can you please advice how ...
I've got a .Net client app calling my .Net web service which in turn calls a third party web service
e.g. at 'www.foo.com'.
.NET Client -> 'My Web Service' -> 'Third Party Web Service'
From VS2008, this all works fine i.e. I'm running 'My Web Service' in localhost:someport
which successfully calls the 'Third Party Web Service'.
I t...
What identifier should I use for TAB (e.g. for output to text files)?
There are many choices:
vbTab
ControlChars.Tab
A constant (or public member) in my application set to Chr(9)
What is best practice? And why?
...