Geeks With Blogs
New Things I Learned .NET Posts that relates to .NET development in general
St. Louis Day of .NET 2014
Last week, had fun by attending the St. Louis Day of .NET. Got to meet a lot of people, friends that I've not met for awhile - this year has just been crazy busy.I was honored to have some of my sessions selected and be presented in this year's conference. They are the following:- C# Features for C# Developers - materials- Exploring Data Binding in XAML - materials- Lessons from Code Review - slidesFun was had by all, and I hope the information can be useful for those that attended my sessions. St. ......

Posted On Friday, November 21, 2014 8:53 AM

St. Louis Day of .NET 2013
An another one has passed us by - this past weekend was the St. Louis Day of .NET, the 6th conference. It was a great event. Due to my hectic work schedule, I've not had meet up with some people for awhile and it was good to see them during the conference.I'd like to give a shoutout to the people I meet: Eric Brown, Lee Brandt, Boon Lee, Jonathan Mills, Rob Keefer and Jesse Phelps. Also thanks to DODN's main organizers: Jeff Fattic (thanks for giving me the opportunity to present), Scott Spradlin, ......

Posted On Thursday, November 21, 2013 4:51 AM

Materials for the St. Louis Day of .NET 2010 presentations - part one
I'm going to be giving a presentation for the St. Louis Day of .NET 2010 - TODAY! Worked out my materials for the first 2 sessions, for those that are interested, they can download the materials: The first session is: JumpStart: Workflow 4. The session describes the core features and technology involved in developing and managing your Activity enriched application workflows using Windows Workflow Foundation 4.0. The files can be downloaded here. The second session is Introduction to 3D in WPF. This ......

Posted On Thursday, August 19, 2010 11:51 PM

St. Louis Day of .NET 2011 - Sessions Materials
I have to say that it has been awhile (just over a year actually) since I've updated my blog. I feel embarassed. On the other hand, I have been quite busy - so it's not like I don't do it because I am lazy (well I am somewhat lazy), but it's because time is somewhat a scarce resource. But... I will try to see if I can muster up some moments to be active with my blog. With that said, last month (August 5th and 6th) St. Louis held the 4th annual conference of the St. Louis Day of .NET. It was a rousing ......

Posted On Tuesday, September 6, 2011 4:10 AM

Materials for the St. Louis Day of .NET 2010 presentations - part two
Finished my session on Asynchronous Adventures in Silverlight an hour ago, and I'm putting up the presentation files. The session is Asynchronous Adventures in Silverlight. Since there are enough sessions about developing XAML, WPF and Silverlight, I've decided to do a session that emphasized the asynchronous nature of most operations that is the default mode of operations in Silverlight. The session talks about the asynchronous pattern used and how widespread it is, discuss about some pitfalls, ......

Posted On Saturday, August 21, 2010 5:37 AM

Refresh / Update WPF controls
Sometime in the past, a friend asked me how to update a control to show status while his code is doing a loop of stuff. Essentially changing the text of a label (or sophisticatedly we can say a text-based progress bar). In my past coding with MFC and WinForms, it's fairly easy enough, you just invalidate and do an update (Invalidate / UpdateWindow in MFC or Invalidate / Update in WinForms). This approach also coincides with how Windows UI operate, where you specify the region that needs to be redrawn ......

Posted On Monday, August 25, 2008 10:22 AM

A quick hello to the Western Kentucky .NET User Group
A few days back, I got a chance to speak at the Western Kentucky .NET User Group meeting in Murray, Kentucky. The opportunity came up because the original speaker, Jeff Blankenburg, had another obligation and was thus unable to come to this meeting. I volunteered to deliver his presentation, which is an overview of MIX10 conference. It was a great experience for me; got to drive around and do a little bit of sight-seeing – can’t say I’ve ever been to Kentucky before, so first trip ever there. I got ......

Posted On Tuesday, April 20, 2010 7:58 AM

My Coding Helpers: Verify exception thrown in Unit Test
Every now and then, I end up writing and re-writing the same code (or very, very similar) to achieve a functionality that I’ve had before. Sometimes I can remember where I wrote it, so I can just copy and paste. At other times, I have to redo it again since I forgot where it was. So I’d like to put it up on my blog so I have access to it. If anyone else gets to see it and can use it, so much the better for everyone. Of course, I’d also accept criticism to the code too . So, this is my first one; ......

Posted On Thursday, November 5, 2009 9:22 AM

Presenting for the St. Louis .NET User Group – What’s new in VS2010 and .NET 4.0
Last night I had the pleasure of presenting a session on ‘What’s new in VS2010 and .NET 4.0’ for the St. Louis .NET User Group. Got to meet with lots of people there, so greets go to all . I had fun with the session; I liked talking about new technology and it’s pretty neat to see everyone and just mingle around with people in general. Pizza was great (thanks to last night’s sponsor: Quilogy) – I have to also thank Scott Spradlin for allowing me to present to the group. The session itself has the ......

Posted On Tuesday, September 29, 2009 9:53 AM

.NET 4.0 and C# 4.0 sessions materials
Yes, I know I'm late. Please forgive me . In any case, the .NET 4.0 and C# 4.0 sessions materials are now available. You can download them from here and here, respectively. In hindsight, the .NET 4.0 presentation should've been called: What's new in .NET 4.0; and even then given the vastness of the material available, it should've been split into 2 sessions: What's new in Visual Studio 2010 and What's new in .NET 4.0 Framework. Given the 75 minutes available for the presentation, I decided to focus ......

Posted On Friday, September 4, 2009 5:09 PM

Intermediate WPF session material
One of the sessions I did in St. Louis Day of .NET is about Intermediate WPF. It seems to be one that people seem to have liked, so I’m making the materials available here first for those that may be interested in playing around with it. The overview description was made before the material is done, and I was not able to show 3D graphics within the sample; my apologies. In any case, there’s really no text out there that defines what is Intermediate WPF; so I just created one . The session goes through ......

Posted On Thursday, September 3, 2009 8:22 AM

Measure more accurately with Stopwatch
I’m finding that writing blogs actually take quite a bit of time; so I’m writing this fairly short blog in Live Writer, with the hope that I can be more productive since the tool will make it easier for me to blog. So, we’ll see :). I’ve used the Stopwatch class for as long as I can remember. I don’t even remember whether I get to know the class from just browsing MSDN, or reading it from another blog, or just playing around typing stuff (and looking at what’s available through Intellisense). Whenever ......

Posted On Tuesday, July 14, 2009 12:08 PM

2009 St. Louis Day of .NET Conference - August 28 & 29
Residing in St. Louis, I just wanted to let others know about the upcoming St. Louis Day of .Net conference! This will be the second time around - last year it was held in December (granted we had a mild winter, it's still cold nonetheless) and this year it's going to be held in August - yay, no more cold (I bet it's going to be very hot in fact). And it has so much content, it's spilling over into a 2 day conference!. Conference website is: www.stlouisdayofdotnet.com - check it out, it has lots ......

Posted On Thursday, June 11, 2009 2:05 PM

St. Louis Day of .NET
Yesterday was the St. Louis Day of .NET event (hencefore I'll refer to STLDODN); it was a great success!. I was fortunate enough to be involved in this grand event; Clint Edmonson asked if I would be available to present some Microsoft PDC material, and I took that opportunity - even got to choose which topic to present. I chose to do a presentation on Parallel Programming for Managed Code Developers. Thanks for the chance, Clint. To make sure I'm well prepared, I also volunteered to present it at ......

Posted On Sunday, December 14, 2008 3:47 PM

Parallel Programming presentation materials
Kansas City hosted a Kansas City Day of .NET this past Saturday; I was fortunate enough to be given the opportunity by Lee Brandt to present there. Wonderful time was had for all, food & drinks were provided along with some nice raffled items at the end. Kudos to the 3 facilitators of this event: Lee Brandt, Becky Isserman and Doug Butscher. In any case, I was there presenting Parallel Programming for Managed Code Developers; essentially re-delivering Daniel Moth's excellent PDC presentation. ......

Posted On Monday, December 8, 2008 2:14 PM

Displaying Rich-Formatted Text in WPF
One project was put forth that essentially requires creating a MessageBox look-alike, but the text supports rich-format, and we can do it in WPF. It's a pretty neat task, and in this post I'll focus on just the text side; the easiest way possible most probably is to just use a RichTextBox control, make it to have no border, and everything will be fine. However, I'd like to do it efficiently as well. FormattedText can be used; however it's hard to make it generic - essentially code has to be written ......

Posted On Monday, November 17, 2008 5:18 PM

Get return value from stored procedure
Recently we changed our DAC layer from using inline SQL to stored procedures in the database. On some of these SQL, we did record deletion (usually only 1 record), and we just execute it via IDBCommand.ExecuteNonQuery() and then check the return value to see how many records were affected (which should be 1) for verification that the query actually does something. With the change to stored procedure, we just return 1 in the stored procedure if the delete is successful. However, the calling code then ......

Posted On Wednesday, September 17, 2008 11:57 AM

Calling Generic Method when given a type
Every now and then I have a need to call a generic method, but I can't quite call it generically. Usually that particular situation involves needing to call a generic method, and I have the type for that generic method. There are various reasons/examples of why anyone would get to this point, in my case we have an infrastructure code that can deal with objects generically, but because it is infrastructure code, we can't have it refer to the actual entity classes that are in the higher layer/tier. ......

Posted On Friday, August 22, 2008 9:41 AM

Pack URI Authority - Local Assembly = Executable
I had a post about accessing XAML resources using Pack URI, and actually had the chance to try it out. The format of the pack URI is "pack://authority/path", and there are only 2 valid authority: application:/// and siteoforigin:///, as described in Microsoft's Pack URI documentation. The path will just point to the resource you want to get; you can include the folder / subfolder, other assemblies (containing the resource), even versions of the assembly. The simplest example they had was: pack://application:,,,/Reso... ......

Posted On Wednesday, April 30, 2008 11:02 AM

Refer to resources in WPF with Pack URI
It's been over 2 months since I last updated my blog. I have been busy; we got a new VP of IT and he made some changes and there are a bunch of stuff that's getting rejigged and people moved, projects retargeted, etc. etc. In the end, it's not enough reason for me to not blog at all. I started this blog so I can record my experiences with learning new stuff. I have to say that I came back to this blog more than enough times to relook at the stuff I had learnt, to the point where my lapse in adding ......

Posted On Monday, April 28, 2008 1:41 PM

Lambda Expression type inference doesn't quite work on actual methods
One of the nice things with lambda expression is type inference - it is actually pretty neat. A neat example that is as follows: private void Test() { string original = "Muljadi"; string upper = Demo(original, s => s.ToUpper()); int length = Demo(original, s => s.Length); } private static TResult Demo<T, TResult>(T value, Func<T, TResult> func) { return func(value); } In the example above, the first call to the Demo method has first parameter being a string - which then is immediately ......

Posted On Wednesday, February 13, 2008 6:47 PM

My foray into Lambda Expressions
I was aware of lambda expressions because I was reading about them in the C# 3.0 white paper specification, along with other new language features like extension methods, anonymous types, basis for LINQ, etc. I thought it was cool enough, it makes passing anonymous delegates much better in terms of code writing/reading. However, actually using them takes a bit of getting used to. As such, I'd like to give a short example as to how I visualize writing lambda expressions. Consider the following class ......

Posted On Monday, February 11, 2008 9:16 AM

New delegates in .NET Framework 3.5
In the way distant past, I ended up creating a new delegate for just about each function I need represented as a delegate. And as I experienced an explosion of delegates and needing to come up with the names for it, I ended up creating 2 sets of delegates as follows: public delegate void VoidFunction(); public delegate void VoidFunction<T>(T argument1); public delegate void VoidFunction<T, U>(T argument1, U argument2); public delegate R Function<R>(); public delegate R Function<R, ......

Posted On Friday, February 8, 2008 12:19 PM

Disposing CollectionView (Detaching your data and the CollectionView)
One of my prior post talks about how CollectionView (and anything deriving from it like ListCollectionView) doesn't get garbage collected after use - even worse it continues to hang onto the data it was bound to, which may cause performance issues. After fiddling through this, I found 3 ways to disconnect them, which I'll detail below. - Derive classes from CollectionView that can dispose itself. The subscriber to the CollectionChanged event is a protected function named 'OnCollectionChanged' - so ......

Posted On Thursday, February 7, 2008 6:08 PM

Advantage in creating a base non-generic class
In the project I'm working in, we use generics a lot - I mean a LOT! Most of the classes we create are also generic types - it provides some niceties that way. As the classes grew, eventually I got to a point where I want to put in a static function that doesn't deal with the generic type, something like below: public abstract class Container<T> { private T _content; public T Content { get { return _content; } set { _content = value; } } public static void SomeStaticFunctionNotInvolv... ......

Posted On Tuesday, February 5, 2008 6:38 PM

An alternative to notifying CollectionView of multiple items changed
While trying to sort out a different problem, I ended up looking at the NotifyCollectionChangedEven... constructor where the first overload only needs a NotifyCollectionChangedAction enumeration with no items needed. It must've escaped my mind since most of the implementation I had so far will actually raise the CollectionChanged event when adding or removing an item, and most of those implementation will just specify the item being added/removed. This single parameter constructor documentation ......

Posted On Friday, January 25, 2008 12:10 PM

protected internal modifier weirdness
I was talking with my peer today, and she told me about the weird behavior of using 'protected internal' access modifier. Using that modifier does NOT mean that the property/field is protected (can only be accessed by that class or derived classes) AND internal (if the derived class is in a different assembly that derived class won't be able to see that property/field). It turns out to be an OR - (per msdn) - that property/field is now protected (can only be accessed by that class or derived classescan ......

Posted On Wednesday, January 23, 2008 6:49 PM

Casting value type to object and back to another value type...
This may be old news for other people, but new to me and I am trying to put in new stuff that I learned. I wasn't aware of this, and after thinking about it, it does make sense (looking at it from how boxing/unboxing works), but I wished it had worked. The following code will throw an InvalidCastException private void PassValue() { float f = 5; double d = CastValue(f); } private double CastValue(object o) { return (o is float) ? (double)o : double.NaN; } So would the following. private void PassValue() ......

Posted On Monday, January 21, 2008 5:12 PM

Understanding Garbage Collection in relation to CollectionView classes
In my post yesterday, I created a rudimentary mechanism to detect if/when an object is garbage collected in .NET. In the example I gave, I created a ListCollectionViewEx class deriving from ListCollectionView. The sample code then tries to create 100 ListCollectionViewEx and then for a GC.Collect. To my surprise, the ListCollectionViewEx objects are not garbage collected. Now, I know the mechanism to record garbage collected item works, because I've tried it with other objects. So what gives? From ......

Posted On Friday, January 18, 2008 3:06 PM

Verifying objects do get Garbage Collected
I learned something new, relating to when/how to dispose CollectionView, but it comes after a series of steps of proving it. Along the way I learned some new stuff to, so I'll stagger them so it becomes easier to read & digest. This post will become the first one in this series (of 3 I think). I'm always somewhat wary about the automatic garbage collection nature of .NET, so every now and then I need to prove to myself that something is actually garbage collected. The technique I use is to create ......

Posted On Thursday, January 17, 2008 2:10 PM

Have worker thread update ObservableCollection that is bound to a ListCollectionView
While playing around with WPF, I tried to do some multithreading where I have a worker thread updating my ObservableCollection, while having a ListCollectionView of that ObservableCollection being shown on a ListBox. It was surprising to see that I get a NotSupportedException thrown, with the message saying 'This type of CollectionView does not support changes to its SourceCollection from a thread different from the Dispatcher thread.'. That doesn't seem to make sense - In my mind, I understand how ......

Posted On Wednesday, January 16, 2008 6:30 PM

ListCollectionView/CollectionView doesn't support NotifyCollectionChanged with multiple items
One issue with an app I'm developing is speed. It's a WPF desktop app, and it has a global list of entities being loaded, and we're using ListCollectionView to show the entities (filtered accordingly by each ListCollectionView created). We always thought that it was a DB issue, so yesterday I went researching how to optimize the DB call & code in general. My code was very spartan; paraphrasing, it goes as follows: BaseEntity[] entities = GetEntities(parentId); foreach (BaseEntity entity in entities) ......

Posted On Wednesday, January 16, 2008 9:33 AM

Binding to an Attached Property
Yesterday, I have some ideas in my mind on how to give out ValidationRule errors after the values passes the converter, and I was trying to see if I can use Attached Properties for that. When trying to do this, one of the things I'd like to do was set a control's text to the Attached Property's value and that's when I realized that I don't know the syntax to do that. A quick Google search yields some results; someone asked the same question and the answer suggested using parentheses. The following ......

Posted On Tuesday, January 15, 2008 12:53 PM

Copyright © Muljadi Budiman | Powered by: GeeksWithBlogs.net