I’m a…
...freelance technologist providing programming and consulting services. How may I be of service to you?
You may e-mail me at llc@bengribaudo.com.
Links
Categories
- Photography (2)
- Programming (34)
- Uncategorized (1)
Tags
.Net Auto-Generation Book Review Bug C# Canon EOS Configuration Container Field Coupon Code DataGrid Duck FileMaker Pro Garbage Collection goto IList Magento Master-Detail Form Object Scope/Context Oklahoma City Operator Payment Processing PDF PHP Rake Ruby SQL SSRS switch Unit Testing User Interface Visual Studio Water Wildlife Windows Forms WPF Zend FrameworkArchives
- March 2012 (2)
- January 2012 (3)
- December 2011 (1)
- November 2011 (1)
- October 2011 (1)
- September 2011 (1)
- August 2011 (1)
- July 2011 (1)
- June 2011 (1)
- May 2011 (3)
- April 2011 (3)
- March 2011 (3)
- February 2011 (2)
- January 2011 (2)
- December 2010 (2)
- November 2010 (2)
- October 2010 (2)
- September 2010 (2)
- August 2010 (2)
- July 2010 (2)
Tag Archives: C#
Master-Detail Forms & Object Scope (Context)
Imagine a master-detail form. The top portion of the window contains a grid listing people’s names. Below is a form where the currently-selected person’s details may be edited. Should data-binding be used to connect the edit form’s fields directly to … Continue reading
Emulating C/C++’s switch Fall Through with C#’s goto
Today, while doing some research in the MSDN Library, I came across an interesting use of C#’s goto statement. Instead of causing the application’s execution to jump to a named label—a practice frowned upon in the programming world—this example used … Continue reading
The Null-Coalescing Operator
C#’s null-coalescing operator (??) simplifies the syntax required to say “the value of an expression is x unless x is null in which case the value is y.” Suppose we want to set the variable salary to a value fetched … Continue reading
How is a WPF XAML file tied into the application’s executable environment?
By hidden source code file… A hidden source code file is auto-generated for each WPF XAML file. The names used for this file and for the class it contains are based off the XAML file’s filename. In a C# application, … Continue reading
Keeping the Selected Item Selected When Changing a ListView’s ItemsSource
A ListView’s data display needs to be updated. The revised dataset, retrieved from the service layer, is contained in a new collection containing new object instances. Setting this IList<T> as the control’s new ItemsSource causes the control to display the … Continue reading
WPF, Where Is Your “static Main()” Method?
The typical WPF application—as viewed in Solution Explorer—consists primarily of XAML files (.xaml) paired with code-behind files (.xaml.cs) and ordinary source code files (.cs). None of these files contains a static Main() method—the starting point of execution in a C# … Continue reading
Bug: Single <Application.Resources> Entry Ignored
Crash! The offending XAML sets a control’s style property to a StaticResource (e.g. <Button Style=”{StaticResource myStyle}” />). The named style is defined in <Application.Resources>. Why then the XamlParseException “Cannot find resource…” exception?
Event Arguments == Static Snapshots?
Is the event argument that’s passed to an event handler/handler override always a non-changing snapshot taken the moment the event occurred? No! While convention suggests a “yes” answer, no technical constrain enforces this assumption (as I discovered recently). The properties … Continue reading
DataGrid – Per-Row Running Totals
The program I’m working on lists transactions in a WPF Toolkit DataGrid. Each grid row displays a transaction’s date, amount, etc. Each row in the grid needed to show the sum of all transaction amounts prior to and including that … Continue reading