I came across a pretty neat LINQ method a while ago that let me write code that is a lot more declarative and a lot less imperative, with the added bonus of removing some nested foreach loops. To illustrate, I’ve defined some contrived classes.

     class Detail
    {
         public  bool AddToOutput { get; set; }
    }

     class Order
    {
         public  bool AddToOutput { get; set; }

         public List<Detail> Details { get; set; }
    }

     class Customer
    {
         public List<Order> Orders { get; set; }
    }

 

This tip, which is not quite obvious from all the RadGridView documentation, works for more than just refreshing aggregates – it can be useful any time you are doing some non-standard manipulations behind the scenes and for whatever reason, the RadGridView isn’t updating to show your changes.

 

In my case, an AcceptChanges() call to a DataRow in a DataTable was getting new server data to show up, but not notifying the grid that it needed to recalculate aggregates. 

 

Although the aggregate would be correct on a full data load,

 

after a partial update, getting new data ...

Join us at booth #705 at the DC convention Center between July 11th and 15th.  Several Falafel Team members and management will be available to answer our questions and help guide you through the best approaches in building Microsoft based solutions today and into the future.

Yes you read that right! Falafel Software is offering a tremendous sale on all Testcomplete SKUs including updates till June 30th 2010, so hurry, there is less than 2 weeks left to take advantage of this sale.

TestComplete 8 is shipping VERY soon, purchase TestComplete 7.5 today and get TC 8 for free when it is released while saving 25% on full versions or upgrades.

 

TC 7.5 Enterprise, Named User

$1,999

$1,499

TC 7.5 Std, Named User

$1,199

$899

TC 7.5 Enterprise, Floating License

$4,499

$3,375

TC 7.5 Std Floating License

$2,999

$2,249

 

If you've added mapping functionality to your Silverlight application, plotted some points of interest on your map, but aren't quite satisfied with the format of the pop-up for your points, I'll show you a technique that will get you started on formatting those Tooltips to whatever your design requires.

If you are new to Telerik's RadMap component for Silverlight, I suggest you review this very informative post from the Telerik Forums to get your first map to display:

 

http://www.telerik.com/help/silverlight/map-create-basic-application-bing-maps.html

 

Assuming you have a Silverlight application that shows an empty map, let's start by creating a custom class ...

In my previous blog post, I covered converting DateTimes between local time and UTC time.  In this post, I’ll cover a more advanced scenario: converting a DateTime from one arbitrary time zone to another.

Step 1: Don’t do it

For most people’s purposes, converting between two arbitrary time zones is a pretty rare occurrence. So before reading the rest of this article, ask yourself if there is a simpler, UTC-based solution to your problem.  Can you, for instance, assume local time on the client and convert all dates that are to be shared between users or computers immediately to ...

Lino Tadros, Falafel Software’s CEO and C# MVP will be representing the Visual Studio 2010 technical staff in Mountain View on June 15th 2010 between 1:00 PM and 5:00 PM.  Come join us at Microsoft and ask your questions, we will be happy to see you and introduce you to the wonderful new features of VS 2010.

Find out first hand about new tools that can boost your creativity and performance at Launch 2010, featuring Microsoft® Visual Studio® 2010.  Learn how to improve the process of changing your existing code base and drive tighter collaboration with testers. Explore innovative ...

Custom attached properties are a great thing to have and use in a project. If you’re unfamiliar with attached properties or custom attached properties, a good overview can be found here. The basic pattern is easy to implement and is generically the same as shown below.

public  static  readonly DependencyProperty IsBubbleSourceProperty = DependencyProperty.RegisterAttached(
  "IsBubbleSource",
  typeof(Boolean),
  typeof(AquariumObject),
  null
);
public  static  void SetIsBubbleSource(UIElement element, Boolean  value)
{
  element.SetValue(IsBubbleSourceProperty,  value);
}
public  static Boolean GetIsBubbleSource(UIElement element)
{
  return (Boolean)element.GetValue(IsBubbleSourceProperty);
}

I am still writing from TechEd 2010 in New Orleans, and have now attended four talks on Windows Phone 7 development and architecture. Here are some notes from what I have learned:

Optimized Silverlight 3 on CE

First of all, let’s talk about what platform you are using when you develop a WinPhone app.

Basically, you can either develop a Silverlight application, or an XNA Game. I wont delve into gaming right here.

The Silverlight on the phone is Silverlight 3.0, almost identical to Silverlight 3.0 on the desktop. It has been optimized to run on smaller memory and constrained ...

Yesterday evening, my Falafel pals at Microsoft Tech Ed asked for a barcode to display in the Falafel booth so that attendees could easily find Falafel 2 Go in the Android Market.  The popular format for doing this is something called a “QR Code”, a 2 dimensional barcode that can embed links, emails, phone numbers, and other digital media. 

 

At first I was thinking it seemed a bit tedious for an attendee to have to use their camera to find our app in the Android Market.  While the QR Code can be used to embed many types of digital ...

 

 

Today is an exciting day for me:  My first blog as a member of the excellent team at Falafel Software, a Falafel Mobile application hits the Android Market, and Steve Jobs even further solidifies my belief that mobile devices are now ready to handle the feature-rich, demanding business applications that Falafel Software will be delivering to our Enterprise Customers.

 

 

Falafel 2 Go

 

 

 

Falafel Software is pleased to announce that the Falafel 2 Go mobile application is now available in the Android Market.  Falafel 2 Go begins its’ life as a simple mobile application ...

This year it is definitely all about the cloud. Bob Muglia’s Keynote was all azure, and a lot of the services in the booths are cloud oriented.

This feels like on of those “in between” conferences, where nobody has all that much to announce. Everyone has been so busy getting products shipped for April, with the .NET framework 4, Visual Studio 2010 and Silverlight 4, so now people are either burned out on vacation, or in deep R&D mode for the next product cycle.

That said, there are some minor releases out from Microsoft:

  • There is a new Windows Azure ...

 

Have you ever wanted to use one of your custom attached properties in a control template?  Well I have, but I never could quite get the syntax right, and my bindings always failed.  I had started to think it wasn’t possible!  It was almost as if the template could never quite find the namespace of the attached property once it was applied to the control.

But then I saw a piece of Silverlight 3 code  that included another declaration of the namespace inside the element tag, and I thought Oh!  Maybe that will help with those times when the ...

Update: See Part 2 of this series for details about converting to and from arbitrary time zones

What’s UTC, and Why Should I Care?

Application developers often rely on UTC (Coordinated Universal Time) to store DateTimes in a location-neutral and time zone-neutral form.  But sometimes you have the wrong kind of DateTime and need to convert it before you can use it.

 

Say, for example, you wanted to develop an application for users spread around the United States, and you wanted to stamp each record they change with a last-updated time stamp.  If you use DateTime.Now on the client ...