background preloader

.NET Framework and .NET SDK Downloads

.NET Framework and .NET SDK Downloads

Watch a Folder For Updates in WPF C# In this example I am using a file system watcher to detect updates in a Windows folder. If a new file is added to the specified folder then it will provide notification of it in a listbox and open it. And when some changes are made to the file then notification of that is also done and the modified file will be copied to another folder. If a rename of a file in the folder occurrs then notification also occurs in the listbox. Also if a file is deleted then notification of that also occurs. The file system watcher has options for all these purposes. When an image is copy and pasted to a folder, it will get a statement in the listbox regarding that. When some modification is made to this image and it is saved, the statement regarding that will be put in the listbox and the file will be copied to another folder. Step 1: Create a WPF application Step 3: In the cs page, first declare the file system watcher, as in: Step 5: Use the following for if a new file is added to the folder:

General, Debugging, Options Dialog Box To access the General page, open the Tools menu and choose Options. In the Options dialog box, expand the Debugging node and choose General. This page lets you set the following general debugging options: Ask before deleting all breakpoints Requires confirmation before completing the Delete All Breakpoints command. Break all processes when one process breaks Simultaneously breaks all processes to which the debugger is attached, when a break occurs. Break when exceptions cross AppDomain or managed/native boundaries In managed or mixed-mode debugging, the common language runtime can catch exceptions that cross application domain boundaries or managed/native boundaries when the following conditions are true: 1) When native code calls managed code by using COM Interop and the managed code throws an exception. 2) When managed code running in application domain A calls managed code in application domain B and the code in application domain B throws an exception. Enable address-level debugging

Enterprises > Blog So you’re looking to build up your social networking traffic and you discovered the use of hashtags on your posts? This article isn't about teaching you the benefit of tagging your posts, it's about what they can bring to your business, and the real power behind them for the companies that provide them. It's about what hashtags really are. Just a follow up to my previous post about my Klout experiment. I've been doing a little social network experimentation. I'm currently working on a new book project on digital strategies. I'm currently working on a new book project on digital strategies. Cinch MVVM Framework Code Generator Cinch source code: Download Cinch demo application which includes everything (including the Cinch code generator) Contents Introduction What is this article all about? Here are the original Cinch articles in case you missed them, and want a read through: You may be wondering what is left to cover. Here is a screenshot of the Cinch code generator in action: And here is what the text highlighting looks like, which uses the most excellent AvalonEdit control by Daniel Granwald, which is a free control available from This used to use the AqiStar control which is a commercially available control, which was an ace control, but people that downloaded this article could not use it, so I switched to using the free one by Daniel Grunwald, which I have to say offers the same features. Daniel's AvalonEdit control allows custom syntax highlighting via the use of an embedded resource file called "CustomHighlighting.xshd", which looks like this:

Writing Notifications That Don’t Suck — Design/UX Remember the Desktop Cleanup Wizard from Windows XP? It popped up regularly saying, “You have unused icons on your desktop.” To this day I have no idea what an unused icon is…and it probably gets my vote for worst notification ever. Good notifications and error messages require care. Not surprisingly, great notifications start with your product mantra, with an understanding – or at least a theory – of who’s using it, for what, and why. Do You Need a Notification At All? Sometimes there’s no need to bother the user. 1. An error occurred. If a notification is useful, can you make it more so? 2. When I mute my Android phone from its lock screen, I get a notification: “Sound off.” 3. Something can be unexpected but still known. The app has already disappeared. 4. The right notification at the wrong time is disruptive, especially if it requires interaction. Or consider this popup, from the camera app on my Android phone: Writing Notifications, for People 5. 6. 7. 8. Putting it Together

VS 2010 and .NET 4 Series [In addition to blogging, I have been using Twitter more recently to-do quick posts and share links. You can follow me on Twitter at: (@scottgu is my twitter name)] Over the next few months I’m going to be doing a series of posts that talk about some of the cool things coming with the VS 2010 and .NET 4 release. VS 2010 and .NET 4 are the next major releases of our developer tools and framework. Together they contain a ton of new functionality and improvements that I think you’ll really like, and which make building applications of all types easier, faster and better. I will update this page with links to the individual posts I do as I publish them along the way: Hope this helps, Scott

MVVM Light Toolkit - Home "Yoda Conditions", "Pokémon Exception Handling" and other programming classics Just reading through some of the excellent answers to this question posed on StackOverflow.com by John K What programming terms have you coined that have taken off in your own circles (i.e. have heard others repeat it)? It might be within your own team, workplace or garnered greater popularity on the Internet. Reposting some of the best ones below ... Yoda Conditions Using if(constant == variable) instead of if(variable == constant), like if(4 == foo). Because it's like saying "if blue is the sky" or "if tall is the man". by [zneak] Originally, yoda conditions might have been introduced to reduce the potential of coding errors in the form if (5 = count) which would be picked up at compile time. Pokémon Exception Handling For when you just Gotta Catch 'Em All. try{ // do something}catch{ // catch em all} by [woot4moo] Egyptian brackets The style of brackets where the opening brace goes on the end of the current line ... if (a == b) { printf("hello");} by [computronium] Different kinds of bug reports

Compiled » String Formatting in C# I couldn’t find a quick reference to .NET string formatting using the String.Format() function, so I created this one (which has also spawned this String Formatting FAQ). When I started working with the .NET framework, one thing puzzled me. I couldn’t find sprintf(). sprintf() is the C function that takes an output buffer, a format string, and any number of arguments, and builds a string for you. For example: char szError[256];sprintf(szError, “Error %d occurred. This would write “Error 12 occurred.” into the szError buffer (assuming nError was 12). str << “Error ” << nError << ” occurred.” << endl; Or something close to that. The .NET framework handles strings very nicely – but it takes some getting used to. string errorString = String.Format(“Error {0} occurred.”, nError); Teeming with metadata, the .NET environment doesn’t need the format string to say what type of data you’re formatting, just where you want it. Strings Numbers Basic number formatting specifiers: Custom number formatting:

A Practical Quick-start Tutorial on MVVM in WPF Download source - 15.6 KB Introduction This article gives a practical quick-start tutorial on MVVM pattern in WPF for application developers. Background The MVVM (Model-View-ViewModel) Design Pattern is a Design Pattern introduced recently in the software development community. According to Wikipedia, the MVVM pattern can be described as follows: Model: As in the classic MVC pattern, the Model refers to either: an object model that represents the real state content (an object-oriented approach), or the data access layer that represents the content (a data-centric approach). You can find many tutorials on developing MVVM WPF and Silverlight applications on the web. This article assumes that readers can create some basic WPF applications, create "XAML" files, and understand the basics of "bindings". Let us start this tutorial by first setting up the development environment. Set up the development environment Create a WPF MVVM application Add a model class Student StudentsModel Run the application

Related: