Welcome to DetlefGrohs.com Sign in | Join | Help

.NET (RSS)

SilverLight Calculator Experiment

I am writing a scientific calculator in SilverLight as an exercise to learn SilverLight and as something to do while watching TV in the hotel at night. Here is the XAML that I have so far: 1: <UserControl x:Class="CALC_SL.Page" 2: xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
posted by detlef | 0 Comments
Filed Under:

Silverlight Different Start Pages

The startup page for a Silverlight application is determined by the RootVisual that is set in the App.xaml file and I wanted a way to have one XAP file with multiple pages that I want to display on pages. My quick solution is to use the InitParameters
posted by detlef | 0 Comments
Filed Under:

Read-Only C# Automatic Properties

I really like the Automatic Properties feature that was introduced in C# 3.0. For those unfamiliar, it allows for the reduction of this common code pattern: 1: private string _MyString; 2: public string MyString 3: { 4: get 5: { 6:
posted by detlef | 0 Comments
Filed Under:

The Null Coalescing Operator (??) and Delayed Object Creation

We have all seen and coded properties like these in our classes that delay the creation of the object until the first time it is needed: 1: private object _MyObject = null; 2: public object MyObjectOldSchool 3: { 4: get 5: { 6:
posted by detlef | 0 Comments
Filed Under:

Rotated Font on Windows Mobile Device

Here is how to draw a rotated font on a Windows Mobile device: Add a reference to the Microsoft.Windowsce.Forms assembly to your project to access the LogFont object. 1: int angle = (int) ((360.0 - 45.0)*10.0); 2: LogFont logfont = 3: new
posted by detlef | 0 Comments
Filed Under:

Web Service Proxy Using and Exception Handling Pattern

Here is the pattern that I currently use for Web Service proxy requests that handles the cleaning up of server and client resources properly. 1: using (WSProxyClient proxy = new WSProxyClient()) 2: { 3: try 4: { // Call the service
posted by detlef | 0 Comments
Filed Under:

Using Explorations

I noted some odd behavior with the use of the ‘using’ keyword in C#. Using the following class that implements IDisposable: 1: namespace UsingExplorations 2: { 3: using System; 4: public class DisposableClass : IDisposable 5: { 6:
posted by detlef | 0 Comments
Filed Under:

Further C# 3.0 Object Initializers Explorations

I like to see what is going underneath the covers for new language features to see if they are implementing IL the way I expect or are they doing something tricky. For the new Object Initializers feature it generates basically the same IL whether you
posted by detlef | 0 Comments
Filed Under:

C# Object Initializers

I didn’t know about this language feature, but I really like it!!! This Pen pen = new Pen(Color) {Width = Size}; is equivalent to Pen pen = new Pen(Color); pen.Width = Size; That is just so cool!!! It is a C# 3.0 feature that apparently even supports
posted by detlef | 0 Comments
Filed Under:

Embedded Resources in ASP.NET Applications

A quick run down on how to embed resources in ASP.NET applications. Add the resource to your solution and set to an embedded resource. Add the following lines to your AssemblyInfo.cs file to allow the WebResource.axd handler to access the resource in
posted by detlef | 0 Comments
Filed Under:

On Vacation – Explorations ASP.NET 3.5 Charting Control

On Vacation until next year, but decided to take a look at some of the new controls that have come out. First looking at Charting controls for the web because of the performance issues that I am running into on the project that I am on. Looking into the
posted by detlef | 0 Comments
Filed Under:

Serialization Explorations

Was playing around with the Serialization of objects to XML and wanted to find out the difference between using the XmlSerializer and the NetDataContractSerializer so I wrote the following command line application to create an object that contains and
posted by detlef | 0 Comments
Filed Under:

XmlNamespaceManager Explorations

I had done some work before around the XmlNamespaceManager before, but had to recreate my work, so now I am posting this somewhere where I can find it later (I hope). Problem is for an Xml document that appears like this: 1: <?xml version="1.0"
posted by detlef | 0 Comments
Filed Under:

Progress Update from a Threaded ASP.NET Application

I had to create a page that would add a large number of items to the cache of a ASP.NET application and I wanted to update the progress. I found an interesting example on the web that I adapted (I will post a link when I find it again) and reduced to
posted by detlef | 0 Comments
Filed Under:

Regular Expression Resources

A collection of regular expression tools and references for my reference. I will be incorporating this into my tools and reference list. Tools Expresso 3.0 - A great regular expression builder and analyzer tool. The Regulator - A regular expression testing
posted by detlef | 0 Comments
Filed Under: ,
More Posts Next page »