I have been working on getting a sample for using XPO from F#. My first sample was easily created back in January this year:

#light
open DevExpress.Xpo
type Person = class
  inherit XPObject as base
  public new(session : Session) = { inherit XPObject(session);
    name = string.Empty
  }

  val mutable private name : string

  member public x.Name
    with get() = x.name
    and set(v) = x.name <- v
end

let person = new Person(XpoDefault.Session)
person.Name <- "Wally"
person.Save( ...

After my recent presentation at the VBUG conference, somebody sent me this question: “I have code to style a button and several triggers to change the button’s background color. For some reason, the trigger for the IsPressed property doesn’t seem to work. Why?” Here’s the style code that was being used (this actually includes some changes I made to the original, but never mind that):

<Style TargetType="{x:Type Button}">
  <Setter Property="Background" Value="Red"/>
  <Style.Triggers>
   ...

I was playing around a bit today with F#, trying to write some real code that interfaces with WPF. Here are a few things I found — very much a “note to self” thing, but if you happen to be interested, please comment or ask.

Number 1 - implementing interfaces that include events is a PITA

I was trying to implement INotifyPropertyChanged, which contains the event PropertyChanged. Eventually I found a working description in this forum thread. I’ve now implemented the interface and a helper …


I just spent a little while hunting down an interesting problem in a little F# app. I had a bunch of code in a single file and I was going to structure it a bit and move certain parts into separate files. I started out from some code like this:

namespace Sturm.MyNamespace

type ICommandLine = begin
  abstract member Parts: string list
end

type IPlugin =
  abstract member CanHandle: ICommandLine -> bool
  abstract member Handle: ICommandLine -> unit

type blah =
  val mutable dummy:  ...

So here they are, the slides and samples of that Functional Programming in C# 3.0 session. My apologies for the slight delay - I already received a few emails about it - but my flight home was cancelled yesterday and everything was a bit chaotic.

Functional Programming in C# 3.0

Have fun!


My talk yesterday at Scottish Developers in Edinburgh went fine — the meeting wasn’t huge, but I had the impression that the topic was interesting to everybody. If you were there, thank you again, and please feel free to contact me if you come up with questions!

Here’s the download of slides and samples from that event: BusinessAppsWithWPFScottishDevs.zip

Update: I noticed that the slides were not in the download — my apologies ab …


2008-02-18

I seem to be having lots of these problems lately that somehow always come up, but never get solved. This time it was the problem of creating a zip file including a large source code hierarchy, but excluding certain directories along the way. More specifically, there are directories called .svn, obj or bin at various places in the hierarchy, and I don’t want to include those. Although I’ve looked around many times, I was never able to find a compression tool that would allow me to specify …


I did that presentation there yesterday. I had added a piece on top, to stretch things a bit more in the direction of WCF: the Game Status Viewer uses an additional published service to query game status information and displays that in a console window.

Here are the slides and samples in that most current version:

Net3GameChallengeNewcastle.zip

During the presentation I also mentioned that permissions problem that comes up when you run the …