Our application has a lot of .NET assemblies, which up until now, has not been deployed with NGen-scripts, so they are always JITted at runtime.
Since our application is typically deployed to a terminal server, getting Windows to share binary images of the code is probably more optimal than the current way, so I'm looking at setting bas...
XAML:
<my:Control ItemsSource="{StaticResource MySource}" A="true" />
Assume a Control with a dependency property A with a default value false;
and a method to handle the Source Collection:
protected override void OnItemsSourceChanged(System.Collections.IEnumerable oldValue, System.Collections.IEnumerable newValue) {}
in which you...
Hi all
When I Use Picture (Every Picture) In WinForms in C#.net,My Application is Very Slow.
What Is Solution?
Edit::
I Use Picture From Resource into Background of Form.
...
hello,
Can anyone tell me the difference between DataGrid(not GridView) and Grid controls in wpf?
Thanks
...
Say I have a L2S Update and I would like to display what changed to the user. Where does GetChangeSet() get populated? Immediately after I assign values or after context.SubmitChanges()?
If the second; I could, theoretically, change the return type to IList and then return return context.GetChangeSet().Updates;?
...
This might be a bit of a code smell, but I have seen it is some production code, namely the use of StringBuilder as opposed to XmlDocument when creating XML documents. In some cases these are write once operations (e.g. create the document and save it to disk) where as others are passing the built string to an XmlDocument to preform an X...
When using code generation templates in visual studio, is it possible to get the current location of the .tt file when the 'custom tool' runs? Suppose my custom template lives in
c:\projects\something\template.tt
When it does its magic, is there a way to return the path above?
<#=PathOfCurrentTTFile #>
(so that PathOfCurrentTTFile =...
Let's assume that we have this class:
public class Person
{
public int Id { get; set; }
public string Name { get; set; }
}
Now, is it possible in C# to intercept call to property get method, run some other method and return result of that method instead of property value? I'd like to be able to do some additional logic behind ...
I have a application that uses the Aero glass effect, so each pixel has an alpha value in addition to red, green, and blue values. I have one custom-draw control that has a solid white background (alpha = 255). I would like to draw solid text on the control using the GDI text functions. However, these functions set the alpha value to ...
In .net I have generated the following public key file:
<RSAKeyValue>
<Modulus>xTSiS4+I/x9awUXcF66Ffw7tracsQfGCn6g6k/hGkLquHYMFTCYk4mOB5NwLwqczwvl8HkQfDShGcvrm47XHKUzA8iadWdA5n4toBECzRxiCWCHm1KEg59LUD3fxTG5ogGiNxDj9wSguCIzFdUxBYq5ot2J4iLgGu0qShml5vwk=</Modulus>
<Exponent>AQAB</Exponent>
.NET is happy to encrypt using it's normal met...
I need to monitor security event logs on very busy domain controllers, which generate hundreds of them each minute.
I know how to use EventLog, EventLogEntry and EvenLogEntryCollection to open and read a server's event log, but an EvenLogEntryCollection can contain ~300.000 events, and it wraps around continuously (and very fast), so I ...
NOTE: I fixed the user agent problem and i also added in an extra byte to match the content length. No luck however.
I dont understand this. I ran this code below and the result json string was the link is expired (meaning invalid).
However the curl code does the exact same thing and works. I either get the expected string with the url...
Hello !
I am developping an application where I need to draw a graph on the screen.
For this purpose, I use a Canvas and I put Controls on it.
An example of such a draw as shown in the app can be found here :
http://free0.hiboox.com/images/1610/d82e0b7cc3521071ede601d3542c7bc5.png
It works fine for simple graphs, but I also want to b...
Is there an equivalent of Monitor.Pulse and Monitor.Wait that I can use in conjunction with a ReaderWriterLockSlim?
I have a class where I've encapsulated multi-threaded access to an underlying queue. To enqueue something, I acquire a lock that protects the underlying queue (and a couple of other objects) then add the item and Monitor.P...
I'm using SetWindowTheme and SendMessage to make a .net listview look like a vista style listview, but the .net control still has a dotted selection border around the selected item:
Selected items in the explorer listview don't have that border around them. How can I remove it?
Windows Explorer:
...
I see similar questions, but it looks like there were due to an unrelated issue.
in 3.5, I have a custom error handler that logs errors and redirects users. My web.config is set up as such:
<httpHandlers>
<add path="error.ashx" type="MySite.Tools.WebErrorLogger, MySite.Tools" verb="*"/>
</httpHandlers>
<cus...
I am trying to get silverlight smooth streaming going on a site I am bilding and it works fine with the big buck bunny sample code which looks like this:
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%" id="Object2">
<param name="source" value="SmoothStreamingBlackGlass.xap"/...
Hello,
On one side, in Vb.Net when you add an event handler to an object the created method is named: <NameOfTheObject>_<NameOfTheMethod>.
As I like to have consistent syntax I always follow this rule when creating event handlers by hand.
On the other side when I create private variables I prefix them with m_ as this is a common thing...
This has been messing me up hard i have been trying to solve this problem and after writing a dummy app to check headers and pointing my code to it i notice HttpWebRequest will completely ignore my user agent when i POST data.
Why? How do i solve this?
...
Hopefully this is a pretty simple question for someone to answer.
I have a drop down list control that I need to pull the value from in the code behind of the page, modify it and redisplay it. The modifying and redisplaying I've got no problem with, it's grabing the value from the drop down control. Examples in C# would be appreciate...