www.planet-xaml.net
  •  

    IronRuby

    Programming Ruby

    • [IronRubyWPF]

      Using IronRuby for WPF ValueConverters

      by Florian Krüsch, October 8, 2007

      Since everyone is talking about IronRuby these days I wanted to try if I could use it with WPF. It's actually pretty easy. There's some info on the IronRuby Wiki on how to execute iron ruby from C#

      What I ended up with is a ValueConverter that essentially takes a ruby block, basically a piece of Ruby code as ConverterParameter and executes its code dynamically to convert a value in a Binding expression.

      The binding expression e.g. to display the letter count of input text then looks like this:
      {Binding Text,ElementName=InputText,Converter={StaticResource RubyValueConverter},ConverterParameter={}{ |value| value.to_s.length.to_s+String.new(" Letters") }}

      This is the block passed to the actual conversion function in Ruby: do |value| value.to_s.length.to_s+String.new(" Letters") end

      If you want to play around with the code, download it here. ["AS IS", no warranties etc ..]

      cheers,
      Florian


      3 comments
    •  ^
    • [IronRubyDLRWPF]

      Scott Hanselmann und IronRuby

      by Florian Krüsch, July 24, 2007

      Scott Hanselmann, Alpha-Geek und bekennender Ruby-Fan wechselt zu Microsoft.

      Ich habe keine Ahnung, was hinter Wesabe steckt, aber dass ich mich jetzt noch ewas tiefer mit meiner neuen "Hobby-Sprache" Ruby beschäftigen kann, ohne meine kuschelige .NET/WPF/ASP.net Ecke zu verlassen, ist schon fein.

      WPF ist zwar noch etwas mühsam, aber für die Zukunft lässt sich absehen, wie sich WPF Apps aus performace-kritischen Teilen in C# und rails-ähnlichen Ruby Teilen zusammenstöpseln lassen werden.

      cheers,
      Florian


      no comments
    •  ^
    • [DLRIronRuby]

      Videos for Compiler Geeks

      by Florian Krüsch, February 20, 2008

      Ever since programming Z80 assembler in the 80s I've been a compiler/language geek. Ironically, one of the two tests still missing for my Bachelor Degree is Compiler Construction. I will never finish this, because there's always a next project coming along.

      Anyway, if you're also a compiler geek, make sure to check out the videos of the talks at the 2008 Lang.NET symposium. Very interesting stuff. I hope I'll find some time soon to play with some of the stuff presented there, especially Irony and the DLR. And yes, the video player is done in Silverlight.

      Also interesting: the plan to add Dynamic lookup to C# vNext. And what the hell is Microsoft up to with model driven development in Oslo?

      Cheers,
      Florian


      no comments
    •  ^
     

Language | Sprache

All[e]  |  english  |  deutsch
Tags
 

Profile

Florian Kruesch

I am working as a freelance software architect, developer and consultant in Düsseldorf, Germany.

My focus is on Microsoft technologies and .NET 3.0, especially WPF, ASP.net and SQL Server.

I've been a lead programmer on the WPF development of the OTTO Vista Store at SinnerSchrader Studios.

My client list includes DHL, LG and Ogilvy Interactive.