June 2006 Entries

Flexible Application Template for WPF

Once again, Daniel Lehenbauer saved my day. After my post yesterday about XBAP and EXE applications, I sent him an email asking for his opinion. He was very fast and I got the answer today. Daniel pointed me to this page, which describes pretty exactly what I wanted, and which comes to the same conclusions as I did: As long as the navigation model and the security permissions allow, switching back and forth is rather easy. Note the use of compilation switches and of runtime checks to see if the application ......

Windows Presentation Foundation: From a XBAP to an EXE

I spent most of the day studying the project properties of WPF applications, both Standalone and Browser applications, and comparing them. The goal is to find out what are the minimal changes you have to apply to a project in order to run an application in the browser, or outside of it. (For those who don't know, WPF applications can run using Internet Explorer as a host (XAML Browser Applications, XBAP), or standalone as a regular EXE. For XBAP, restricted permissions apply (sandbox), and of course ......

RealSimpleBlog custom control (V0.1): Day 5

I reached my goal for today, which was to implement the Image element. So now my blog control can display: Date, Title, Text, Frame, List, Image. The last one I still need to write is a small element displaying a thumbnail banner. Since thumbnails are made actually images, I can reuse my method, so it should be fast. I reworked the XSD schema, because the Image element was really too simple in the last version. I extended it with a Link, a Target for the link, and a ALT attribute, which is also used ......

QuickNews and AvantGo

I spent yesterday's evening working on the other project occupying me in the moment, which will link QuickNews to AvantGo (two Palm OS programs which one can use to read RSS feeds). How to link them? Well, QuickNews is very good because it's fast, efficient and to the point. However, it doesn't render HTML, it cannot follow links, so sometimes it's just too short. AvantGo, on the other hand, is a HTML compliant reader, can follow links, can be used to browser online or offline (you have to synchronize ......

RealSimpleBlog custom control (V0.1): Day 4

Nice job this weekend. I moved forward a lot, implemented major features, tested most of them pretty extensively, thought about the future, and learned new things. So far, the features implemented are: Date, Title, Text, Frame, List. Features not implemented yet are: Images, Thumbnails. That should follow soon. Another important feature implemented: Each entry has an attribute "archive-older". If this attribute is set to "true", no older entries will be displayed after the current one. However, if ......

RealSimpleBlog custom control (V0.1): Day 3

I did quite a lot of work yesterday, implementing the following elements: Title, Paragraphs, Frames. One feature I like in the control is that you can write big chunks of texts without having to care about formatting the text: the control will automatically insert <br /> and <div> elements to separate the text in smaller chunks. All you have to do is insert one carriage return, or two carriage returns. That will speed up text input. By the way, what I used to call V1 will actually be ......

WPF Demo: Download problems solved

Following my change to a new ISP for the GalaSoft website, I completely forgot to copy the sample files of the WPF demo to the new ISP. So between yesterday evening and now, the download was not possible. The error is now corrected, and the following files are available again: Project files ......

RealSimpleBlog custom control (V1): Day 2

I spent an exciting evening yesterday starting to work on my RealSimpleBlog control. As usual when programming really starts, a few question arose, but mostly everything was very clear in my mind, thanks to the simple, but complete list of requirements I intend to implement before we go in holidays. That proves once again that even in a one-man team, even when programming private projects, even just as a hobby, a few simple rules help to be more efficient and to write better code. Off the top of ......

New Internet Service Provider

So, after copying, testing and changing the DNS entries at Switch, my website is running at my new provider. The first tests I made prove that it's way easier to set up web applications, web services and other exciting stuff now, so that after doing it professionally only, I'll be able to use all these nice technologies on my own site too. That's great ......

RealSimpleBlog custom control (V1): Day 1

I started writing my RealSimpleBlog control yesterday. The goal is to have V1 up and running by July 12th, which is the date we're flying off to Malaysia for 3 weeks holidays. I plan to integrate the control in my PhotoAlbum, and to blog on that page while I am away. That will provide a nice test for the concept. V1 will be pretty basic, considering I'll have only 3 weeks to implement it. But it will be the basis for future development, and I am pretty excited about it. RealSimpleBlog V1 Requirements ......

Saving files with JavaScript: CExplorer (demo)

Many people assume that client-side JavaScript cannot perform file-system operations on the client computer. Actually, the objects needed are often found in the browsers, and the rest is only a matter of compatibility (the way IE saves files is very different from the way Firefox saves files...) and of permissions. In order to perform critical file-system operations, the script must be granted privileges. There are different ways to get these privileges, and unfortunately, these are very different ......

ToDo list before holidays

On the 12th of July, we'll be heading East, towards Malaysia. I can't wait to be back there, after an absence of exactly 2 years. I am a big fan of ToDo lists, and love the feeling of marking an item "Done". So here's is my technology ToDo list before we fly! Before leaving, I want to Correct an error in my website's menu, which causes a problem when a new item is added under a collapsed node. (Done) Change Internet Service Provider. The current one is cheap, but doesn't allow much control from the ......

WPF Demo: Zip files posted (to solve the ClickOnce issues)

It seems that ClickOnce deployment doesn't always work: First if you don't have IE, it won't work for you. Second, some network settings prevent the application to be installed correctly, for example in a firm's network. To correct that, I uploaded two Zip files for my WPF demo. If you have problems installing or running the demo, contact me and I'll do my best to help ......

Windows Presentation Foundation Demo

I wrote a WPF demo to test and present the technology to other people. Abstract: This WPF demo is used to test and demonstrate a few basic concepts and capabilities of the new Windows Presentation Foundation framework. It includes binding, UI elements, scaling, rotating, skewing, brushes, styles, 3D with images, textures and video, and manipulation of media elements. The demo is available here More screenshots ......

Question: How do you blog when you're away?

Next month we go to Malaysia (my wife is from there) and it would be great to blog "on the go". I am equipped with a Palm LifeDrive and a mobile phone, so I can either connect using WiFi (in McDonalds, Starbucks...) or even using GPRS on my mobile. What I am not sure of, however, is what the best way is to transmit my posts to the GeeksWithBlogs account. I tried using AvantGo or Blazer to post through the Admin webpage, and it works, but it's a little cumbersome. Ideally would be if there is a way ......

Setting cookies with JavaScript: CCookie

I posted my CCookie JavaScript object in answer to a question asked in comp.lang.javascript. This object offers an abstraction to the cookie interface present in the web browsers, and allows using methods instead of manipulating the cookie string directly. The code is self documented, and I'll extract the documentation soon. To document my JavaScript object, I use an extended version of the XML code documentation used in C#. The extensions allow to specify the type of a parameter, of a return value... ......

What's keeping me busy lately? Part 1: WPF

Since my trip to Vegas where I attended MIX06, I have played a lot with Windows Presentation Foundation (WPF). So, what's WPF? In just a few words, it's a new graphics framework that is built on top of .NET, and which allows building graphical applications, from standard UIs to multimedia and 3D jewels. WPF introduces a new XML-based language named XAML (eXtensible Application Markup Language). WPF is very exciting to me because I am a hardcore software developer, not a graphics designer, and yet ......

Welcome to my blog

Look at me, I got a new blog ;-) Before starting to post more technical things, I'd like to say a few words about myself. My name is Laurent, I am swiss, born in Lausanne in 1971. Currently I live not far from Zurich with my wife and my 2 daughters. I work as a software engineer for Siemens since 1996. My work has made me touch a lot of different programming languages and environment, starting with embedded C, and moving to embedded C++, then Java, and for the last 4 years working with .NET technologies. ......