Quick FAQ: How to use “With…End With” VB statement in C#?

27 במרץ 2008

Q: With…End With VB (.NET) also statement is very handy time saver. It makes you able to initialize properties of the object within one statement. Is there equivalent for this “With…End With” statement in C#? Dim myObj As New MyObj() With myObj     .OneProperty = "Hello"     .AnotherProperty = 2008     .YetOtherProperty = "World" ...
2 תגובות

FindResource replacement and how to change control style more then once in Silverlight 2.0 application

25 במרץ 2008

As deeper we’re digging in Silverlight 2.0, we finding more and more WPF things and we’re really missing in Silverlight. One of such things is FindResources. In WPF I had Visual and Logical tree, so I was able to travel the tree to find resource I need. Let’s see an example of the application. We have one resource defined in App level <Application.Resources>         <Style TargetType="Button" x:Key="green"> ...
4 תגובות

Networking and sockets in Silverlight 1.0 (mobile to?)

24 במרץ 2008

Well, well, well. Two days ago, we spoke about using sockets within Silverlight 2.0 and WPF. Today, we’ll make a step ahead and will use TCP or UDP client-server connection within Silverlight 1.0. Yes, 1.0 (the one with JavaScript only and no sockets). So, let’s start Rock ‘n Roll. Oh, baby – it cannot be done! Just kidding :) Silverlight 1.0 itself cannot use sockets, however ASP.NET can. We’ll reuse our socket library (from the previous post)...

Networking (raw sockets) in Silverlight and WPF – messaging in general

22 במרץ 2008

You, probably, know how to use raw sockets in WinForms. It's pretty the same in WPF, however it is very different (and limited) in Silverlight. Today, we'll create sample application in Silverlight, WPF and WinForm that sending and receiving updates via TCP as well as broadcasting it via UDP (singlecast and multicast). So let's start. First of all we'll create WinForms server, that should distribute updates. It knows what the time is it now and broadcasting the...

You can meet me face to face in TechEd

18 במרץ 2008

Starting today, if you are attending TechEd '08 Israel, you can set an appointment with me, by using a meeting system in TechEd website. All attendees received an email with username and password to access the system. So enter, click Find and look for WPF, Silverlight or, just תמיר חסון. Then click Request to meet and that's it. Note, my free slots will be closed very soon, so, if you want to see and ask me...
אין תגובות

Localization fix for SAP ES Explorer for Visual Studio

13 במרץ 2008

A couple of days ago, new great product was released by SAP together with Microsoft. It named SAP Enterprise Services Explorer for Microsoft .NET (you can download sneak preview for free). It come to exchange SAP.NET Connector and enables to use SAP Enterprise Services as regular Web references or WCF services. This product still in beta, however there is already major issue - it does not work in localized version of Visual Studio. Neither 2005 nor 2008. Why this happens?...
9 תגובות

Running WPF on gas pump (or other Windows CE devices)?

What do you think, is it possible to run WPF on Windows CE enabled devices (e.g. gas pumps, GPS systems, robots, game or automatic teller machines or, even, scientific calculators)? Let's see following code: StackPanel panel = new StackPanel(Orientation.Horizontal);             Ellipse ellipse = new Ellipse(10, 10);             ellipse.Fill = new SolidColorBrush(Colors.Red);             ellipse.Stroke = new Pen(Color.Black);             Rectangle...

Deep Zoom composer for download

12 במרץ 2008

One of best technologies, presented at Mix'08 was HardRock Memorabilia. It uses technology, previously named Seadragon to adapt image resolution and size to what you're currently viewing. It montages number of images in different resolutions and then dispatches them upon your request. Take a look into Silverlight 2.0 poster, created by Joe StegmanNow, the million dollar question, how to use it in my application? Simple just download and use it :)Download Deep Zoom Composer for Silverlight>>
3 תגובות