Monday, June 30, 2008

Printouts of the slides, presented on Silverlight 2.0 open house today

Thank you all, who participated today in Silverlight 2.0 for building Rich Internet Applications event. I uploaded printouts of the slides, presented during the session here. So, you can download it for reference.

I’m really interesting within your feedback (leave comments) in order for me to be able to enhance it for future events.

Also, I want to remind you, that due to lack of space we were unable to handle all those who want to attend, thus we decided to make another session within two weeks, so can register here. Remember, only registered attendees, who with confirmation received will allow to enter. So, hurry up.

If you want to learn more about Silverlight, you can register to attend Expert Days “Mastering Microsoft Silverlight 2.0 – 020 full day course, 13-August, were we’ll have Silverlight 2.0 deep dive training day. You can also review another two courses, I’ll have there:

Download slides from today session >>

Register to attend next event at 23 July >>

image

Thank you and leave a comment…

Sunday, June 29, 2008

Silverlight 2.0 for building Rich Internet Applications (Local Event) – Take 2

As promised earlier, the next session of Silverlight 2.0 for building Rich Internet Applications will take place at 23 July, 8:30 AM-12:30 PM in ILDC. This is exactly the same session for those, who unable to attend tomorrow due to lack of place.

Please, this time, try to register as soon as possible to assure seat assignment.

Register to attend Silverlight 2.0 for building RIA >>

Thursday, June 26, 2008

Please do not ask me. We cannot handle more…

Monday next week, I’ll making half day session about building rich internet applications with Silverlight 2.0 in ILDC. The registration is over a while ago, but during this week, I got very large amount of email, IMs and phones calls with appeal to attend.

Sorry, we’re fully booked (currently about twice of available seats) and cannot handle any more. Only those who registered and got confirmations will allow to enter. It is for your own convenience!

I promise, that within next two weeks I’ll make the same session again for all those, who want to come, but unable to register and attend (after a small arrangement, I’ll publish here next date).

Thank you again for understanding and see you soon.

Monday, June 23, 2008

How to consume WCF or Webservice from Vista Sidebar gadget by using Silverlight?

The challenge today is really simple. All we have to do is to write Silverlight Vista Sidebar Gadget, that consumes either WCF, ASMX or REST based service. Really simple, isn’t it? Let’s start

image

Build server side services

We should start from services. This is very straight forward mission. Here the logic I want to implement

public string Echo(string input)
    {
        return string.Format("ACK from {0}", input);
    }

Well, WCF? We should mark service and operation contracts. That’s all

[ServiceContract(Namespace = "")]
public class EchoService
{
    [OperationContract]
    public string Echo(string input)
    {
        return string.Format("ACK from WCF with {0}", input);
    }

}

This does not works. Why? Silverlight knows only consumes ASP.NET compatible (simplified) web services, thus we should add following attribute to the our class attributes collection

[ServiceContract(Namespace = "")]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class EchoService
{

Now, the service is discoverable and accessible by Silverlight. Great news. Now let’s put it into our shared host. Hmm, we got strange error: “Deploying WCF Services: This collection already contains an address with scheme http.” What the hell is it?

This is shared hosting problem. Your host provider uses virtual IP and host addresses and has number of different web services, sitting on the same shared host. How to solve it?

Simple, all you have to do is to specify your own service host factory. Here the example of classes to put into code behind

class SLHostFactory : ServiceHostFactory
{
    protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)
    {
        SLHost customServiceHost =
          new SLHost(serviceType, new Uri("[Your URL goes here]",UriKind.Absolute));
        return customServiceHost;
    }
}

class SLHost : ServiceHost
{
    public SLHost(Type serviceType, params Uri[] baseAddresses)
        : base(serviceType, baseAddresses)
    { }
    protected override void ApplyConfiguration()
    {
        base.ApplyConfiguration();
    }
}

And one attribute into your service tag

Factory="SLHostFactory"

Now it works. So what’s next? Build ASMX web service. This is even simpler

[WebMethod]
public string Echo(string input)
{
    return string.Format("ACK from web service with {0}", input);
}

We done, now either WCF and Web services are accessible from your Silverlight application. So, add Service reference and consume it

Building client side

Inside code behind of your Silverlight project, you should define two proxies – one for Web Service and another for WCF service. Bother services implements the same interface, so it should not be a problem

ServerEcho.EchoServiceClient proxy;
WebServiceEcho.EchoWebServiceSoapClient wsProxy;
private void UserControl_Loaded(object sender, RoutedEventArgs e)
{
    proxy = new ServerEcho.EchoServiceClient();
    proxy.EchoCompleted += new EventHandler<ServerEcho.EchoCompletedEventArgs>(proxy_EchoCompleted);

    wsProxy = new SLGadget.WebServiceEcho.EchoWebServiceSoapClient();
    wsProxy.EchoCompleted += new EventHandler<SLGadget.WebServiceEcho.EchoCompletedEventArgs>(wsProxy_EchoCompleted);
}

Silverlight work only asynchronously, thus you should begin to understand, that synchronous programming is for pussies :). Consume it

private void WCF_Click(object sender, RoutedEventArgs e)
        {
            proxy.EchoAsync(txt.Text);
        }

        private void WS_Click(object sender, RoutedEventArgs e)
        {
            wsProxy.EchoAsync(txt.Text);
        }

And Update output

void wsProxy_EchoCompleted(object sender, SLGadget.WebServiceEcho.EchoCompletedEventArgs e)
        {
            txt.Text = e.Error == null ? e.Result : (e.Error.InnerException != null ? e.Error.InnerException.ToString() : e.Error.Message);
        }

        void proxy_EchoCompleted(object sender, ServerEcho.EchoCompletedEventArgs e)
        {
            txt.Text = e.Error == null ? e.Result : (e.Error.InnerException != null ? e.Error.InnerException.ToString() : e.Error.Message);
        }

Now let’s run it. What? Another error? Security? Access denied? Of cause you have no crossdomain.xml.

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>



What? You have it and still getting the same error? Look into sniffer. You application is looking for other file, named clientaccesspolicy.xml. Why? According the documentation, you can use either… Hm, another bug with WCF consuming. Never mind, let’s put it too




<?xml version="1.0" encoding="utf-8"?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="*">
<domain uri="*"/>
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true"/>
</grant-to>


    </policy>
</cross-domain-access>
</access-policy>



Very well, now we are ready to run our application. It works! So, the only thing we should do is to pack it into MyGadget.gadget directory and put inside %userprofile%\appdata\local\microsoft\windows sidebar\gadgets together with gadget.xml manifest.



But… It stopped working… What’s the problem?



Very client side networking in Silverlight



The problem is, that SideBar executes it’s gadgets with local path, not with network path. Silverlight cannot use any network provider, when running locally. Why? Actually I do not know (maybe to prevent local applications development). so what to do?



Simple! Microsoft SideBar knows to run cross domain AJAX without any warnings and problems. So why not to use external XmlHttp from JavaScript for network access. Let’s do it



First we should initialize XMLHttpRequest object in JavaSctipt




var xObj;

        function getEchoWCF(text) {


            if(xObj == null) {   
                xObj = new XMLHttpRequest();


                }


            else if(xObj) {


                xObj.abort();


            }




Then create SOAP request to WCF or WebService




var sURL = "[Path yo your service]";

            //Build SOAP


            var sReq = "<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\"><s:Body><Echo><input>"+text+"</input></Echo></s:Body></s:Envelope>";


            xObj.open("POST", sURL, true);


            xObj.setRequestHeader( "Content-Type", "text/xml; charset=utf-8" );


            xObj.setRequestHeader( "Cache-Control", "no-cache" );





xObj.send(sReq);




After the request created and send we should handle result. So we need an access from HTML page, hosting Silverlight object to Silverlight. Simple. “ScriptableMember - ScriptableType”, remember?



[ScriptableType]

    public partial class Page : UserControl


    {







[ScriptableMember]

        public void UpdateResponse(string result)


        {



Now return the result




xObj.onreadystatechange = function() {

            if (xObj.readyState === 4) {


                if (xObj.status && xObj.status === 200) {   
                    var control = document.getElementById("silverlightControl");


                    control.Content.Page.UpdateResponse(xObj.responseText);


                }


            }




But this is not enough. We also should know to call Javascript from Silverlight… This is really simple




private void JS_Click(object sender, RoutedEventArgs e)

        {


            HtmlPage.Window.Invoke("getEchoWCF", txt.Text);


        }




We done. Now you can pack your Silverlight control, together with hosting HTML and Javascript into windows sidebar gadget and use it even with external network support.



Have a good day and be nice people.




Sunday, June 22, 2008

Mastering Images in WPF

If you are “in” WPF imaging, you, definitely, should read this post of Dwayne Need (who is SDM of WPF in Microsoft) about customizing BitmapSource. A ton of information about how to make Bitmap Source for your needs, what WIC is and how to use it. Also he has a lot of samples in CodePlex. Great work, Dwayane.

Thursday, June 19, 2008

Quick Silverlight tip: How to set format and validate value in TextBox?

Today morning I got an email from one of Microsofties, asking following question:

Is there any way to set format and validation on TextBox in Silverlight 2. TextBox format: Date Format, Currency Format etc, TextBox validation: Regular date expression, should allow only numeric etc. If it’s possible out-of-box how do I do it?

The answer is, that there is no data validation or formatting in Silverlight, however it’s very simple to build converter to format binded value. Here the code of the converter:

public class TextFormatConverter:IValueConverter
   {

       #region IValueConverter Members

       public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
       {
           return Format(value, parameter);
       }
       public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
       {
           return Format(value, parameter);
       }

       object Format(object value, object param)
       {
           if (value == null)
               return value;
           int ri;
           double rd;
           if (int.TryParse(value.ToString(), out ri))
           {
               return string.Format(param.ToString(), ri);
           }
           else if (double.TryParse(value.ToString(), out rd))
           {
               return string.Format(param.ToString(), rd);
           }
           else
           {
               return string.Format(param.ToString(), value);
           }
       }

       #endregion
   }

Here the usage:

<TextBox Text="{Binding String, Source={StaticResource data}, Mode=TwoWay, Converter={StaticResource formatConverter}, ConverterParameter='{0:0.00}'}" />

Regarding validators – There is no ValidationRule or IDataErrorInfo in Silverlight right now. If you want to have it, you’ll need to write your own custom TextBox with validation. But, I’ll speak next time about it. ValidatingTextBox with format support will be a part of Silverlight controls library when I’ll have a time for it.

Have a nice day and be good people.

Wednesday, June 18, 2008

The truth about HTC has been revealed!

HTC is underground factory, that manufacturing cat eater cyborgs (Cats? Why Cats? Don’t you know, what PDA is? It’s Pussy Defended Asset. Other words male mouser). Especially, those cyborgs eat cats is disguise of Mobile Phones.

Cat-eater

Where HTC located?

HTC located on the moon. Not in China. The facility is in one of moon craters inside the old spacecraft, abandoned by HAL from a space odyssey. Once a year, this moonbus rides to the Earth with new cyborgs production on board.

HTC production

At glance, the production of HTC looks like a regular mobile phones, however it has no phone capabilities. Therefore, once it leaves moonbus it eats fist mobile phone found. Momentarily after, cyborg’s internal infrastructure adopts the consumed cat and starts to operate as long as life endures, producing the illusion, that the cyborg is regular mobile phone.

However, the main mission of HTC production is to eat cats. It do the offense nightly, when the owner sleeps. It comes out and every time, seeing a cat, exclaims: “Hey, That’s Cat!”, then swallows the victim. Once the cyborg loaded up, it return to the owner.

The other ability of HTC production is zombying of its owners. It washes their brains and commands them to think, that cyborgs are the best mobile phone ever. All other phones are missing of features and very user unfriendly. Because of it, most of mobile phone owners forgot how to use regular mobile phones.

Cyborg detection

In spite of good camouflage, it’s possible to detect cyborgs:

  • Occasional pressing of phone screen does nothing for regular mobile phones, however cyborgs very sensitive to this action
  • Upper cover of the cyborg consists of strange rectangle thing. It’s the antenna, used by the cyborg for zombying owners.
  • One of following words might appear in cyborg’s front or back panel: i-mate,t-mobile,eten,asus,htc,orange,AT&T
  • Sustained use of cyborgs causes headache or migraine.

The cyborgs are extremely dangerous for cat population of the Earth, thus every time, you detect the cyborg, please, report to WWF, Heath Officer or FBI.

Thank you for cooperation.

[illustration by DaKraken, inspired by absurdopedia]

Tuesday, June 17, 2008

HLSL (Pixel shader) effects tutorial

Recently, I already wrote about PixelShader effects, introduced in .NET framework 3.5 SP1 (WPF). However it looks like for most people this syntax is still hard to understand. Today we’ll try to lean it more. In order to do this, I wrote small program, that helps you to write and debug pixel shader effects quickly. This how it looks like

image

Hit Open to load image, Write your code and hit Execute to compile and apply bitmap dx effect to the image. Let’s start from very beginning. Effect, that does nothing:

sampler2D input : register(s0);
float4 main(float2 uv : TEXCOORD) : COLOR
{
    float4 Color;
    Color = tex2D( input , uv.xy);
    return Color;
}

This is the results:

image

What was done? We got pixel. Read it color and return it as it to the shader. Let’s do something more interesting.

Actually we can get float2 as coordinate, this means, that it can be spitted to uv.x and uv.y. Also color is float4 (argb), thus we can change color. Let’s multiply color by 3

Color = tex2D( input , uv.xy)*3;

And the result is bright image

image

We also can make operations with variables.

Color = tex2D( input , uv.xy)*uv.x;

Result

image

We not have to change whole color. We can also change only its part. Blue for example

Color = tex2D( input , uv.xy);
Color.b = Color.b*2;

Result

image

Or execute math operations

Color = tex2D( input , uv.xy);
Color.r = Color.r*sin(uv.x*100)*2;
Color.g = Color.g*cos(uv.x*150)*2;
Color.b = Color.b*sin(uv.x*50)*2;

Result

image

Color is not only thing we can operate. Actually we’re sampling coordinates, so operations done with coordinates should work. Let’s try to stretch image

uv.x = uv.x * 0.5;
Color = tex2D( input , uv.xy);

Result

image

Why 0.5? Should not it make it smaller? Actually not, you’re multiplying coordinates, so to make the image smaller, you should divide

uv.x = uv.x / 0.5;
Color = tex2D( input , uv.xy);

Result

image

Some math could be fun here also

uv.y = uv.y  + (sin(uv.y*100)*0.03);
Color = tex2D( input , uv.xy);

Result

image

There are a ton of interesting effects you can do by using pixel shaders. Here for example color shift

   Color = tex2D( input , uv);
Color.r -= tex2D( input , uv +(somevar/100)).r;
Color.g += tex2D( input , uv+ (somevar/200)).g;
Color.b -= tex2D( input , uv+ (somevar/300)).b;

Result:

image

Or, even cooler efects

Color -= tex2D(input , uv.xy-0.003)*2.7f;
Color += tex2D( input , uv.xy+0.003)*2.7f;
Color.rgb = (Color.r+Color.g+Color.b)/3.0f;

Result

image

You can also use cases and ifs for even cooler effects

Color.rgb = (Color.r+Color.g+Color.b)/3.0f;
if (Color.r<0.2 || Color.r>0.9) Color.r = 0; else Color.r = 1.0f;
if (Color.g<0.2 || Color.g>0.9) Color.g = 0; else Color.g = 1.0f;
if (Color.b<0.2 || Color.b>0.9) Color.b = 0; else Color.b = 1.0f;

Result

image

Other words, the sky is the limit.

Please note, that Pixel Shaders done in GPU only, thus it is the most efficient method to manipulate your images. Actually, you can apply effect to any UIElement, thus the sky is really the limit.

Have a nice day and be good people. Download code for this article. Notice, that you’ll need DirectX SDK to compile pixel shader files and use this program

Monday, June 16, 2008

UserControl binding to own property bug in Sliverlight 2.0 beta 2

Today morning, I come to my office. Alex, sitting there, was very tired. His eyes were red. I asked him: “What’s going on?” and he responsed: “I think, I’m sick. Something is broken in Silverlight”. “What’s the problem?” – I asked. And he explained me, that he want to create UserControl with some properties. Let’s say something like this:

<UserControl x:Class="SilverlightControl1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Width="400" Height="300">
    <Grid x:Name="LayoutRoot" Background="White">
        <TextBlock Text="Hello, World" Name="tb" FontSize="{Binding MySize}"/>
    </Grid>
</UserControl>

Where MySize is internal dependency property of the SilverlightControl1. Now you’re going to your application and consuming your new control.

<l:SilverlightControl1 x:Name="kuku" MySize="40"/>

This does not work. Maybe the problem is DataContext? Let’s set DataContext of UserControl to itself

public SilverlightControl1()
        {
            InitializeComponent();
            this.DataContext = this;
        }

Ups… “An unhandled exception of type 'System.StackOverflowException' occurred in System.Windows.dll”. Well, why binding does not happens?

Maybe the problem is binding? Let’s try to explicitely bind to it property.

Binding b = new Binding("MySize");
b.Source = this;
tb.SetBinding(TextBlock.FontSizeProperty, b);

Nothing happens. Where to dig? Maybe notification changes not happen? Let’s add INotifyPropertyChanged notification

public double MySize
        {
            get { return (double)GetValue(MySizeProperty); }
            set { SetValue(MySizeProperty, value); PropertyChanged(this,new PropertyChangedEventArgs("MySize"));}
        }

Now it works, but what will happen if we’ll remove explicit binding? Nothing this does not work. What’s the problem?

The problem is bug in Silverlight 2.0 beta 2. To workaround it, you can either use explicit binding inside the usercontrol, or (like me) create external data class and bind to this class.

public class MyData : INotifyPropertyChanged
{
    public double MySize
    {
        get { return m_MySize; }
        set
        {
            m_MySize = value;
            OnPropertyChanged("MySize");
        }
    }

    double m_MySize = default(double);

    #region INotifyPropertyChanged Members

    public event PropertyChangedEventHandler PropertyChanged;

    public void OnPropertyChanged(string name)
    {
        if (PropertyChanged != null)
            PropertyChanged(this, new PropertyChangedEventArgs(name));
    }

    #endregion
}

Create DataContext

MyData d;
       public SilverlightControl1()
       {
           d = new MyData();
           InitializeComponent();
           this.DataContext = d;

And then, extern the property to the control

public double MySize
        {
            get { return d.MySize; }
            set { d.MySize = value; }
        }

We done. Hope this nasty bug will be fixed in RTM version of Silverlight. Have a good day and be nice people.

Have a nice day to Alex to. Do not try to understand what’s problem with your code, when working with beta version of any framework. First check alternatives.

Sunday, June 15, 2008

Silverlight controls library has been upgraded to Beta 2

Finally this weekend I got  a time to upgrade one of my OpenUp submissions, Silverlight controls library to work with Silverlight 2.0 beta 2. It was very interesting to track changes between developer’s (beta 1) and production (beta 2) go-live licenses. Let’s try to understand what has need changed.

  1. Syntax of DependencyProperty registration. Now instead of DependencyProperty.Register(name, propertyType,ownerType,propertyChangedCallback) you should use DependencyProperty.Register(name, propertyType,ownerType,typeMetadata), which, actually receives only one parameter in constructor – propertyChangedCallback. This make Silverlight to be closer to WPF syntax and open it for future enhancements. You can download updated Visual Studio 2008 snippet for creation of Silverlight Dependency Properties.
  2. OnApplyTemplate method of UserControl become public instead of protected
  3. Thumb DragDelta event argument is not DragEventArg anymore. Now it’s DragDeltaEventArgs. So there is no HorizontalOffset and VerticalOffset attributes. They replaced by HorizontalChange and VerticalChange
  4. DefaultStyleKey is not null anymore
  5. Most of controls migrated from System.Windows.Controls into System.Windows namespace
  6. Some changed to ToolTip service
  7. Now Silverlight checks whether TargetType property of Style is really compatible with the control, you’re applying style to (this not happened in beta 1). Also DependencyObject.SetValue() method checks it’s type.
  8. There is no InitializeFromXaml anymore. Now Silverlight works more “WPF style” with application services – Application.LoadComponent()
  9. You cannot use x:Name and Name property together (someone did it?)

There are a ton of other changed, that was not related to Silverlight Control Library. For example, changed within Storyboard class, networking, cross-domain policy, other controls (e.g. DataGrid), Templates of some controls (e.g. Button, TextBox, etc) and API.

Also I want to invite you to take part into development of Silverlight controls library not because of complimentary ticket to PDC ‘08 or Mobile Memory Mouse 8000, but because Open Source is not “one-men-show”. To get access to SVN, submit your work and begin development of next generation of Silverlight controls, contact me via CodePlex and I’ll add you to the project as new contributor.

Friday, June 13, 2008

Presenting at TechEd Developers South Africa 2008, Durban

Save the date. TechEd Developers South Africa is around the corner (August 3rd through 6th). This year it will take place in Durban, the third most populous city in South Africa.

image

This TechEd, there are four sessions assigned to me:

Creating Rich Applications with Windows Presentation Foundation (300)

Completely new session about how to enrich user experience, by decreasing development efforts with WPF. In order to do this, we’ll try to take some application and completely recreate it, by using XAML only without any single code line.

Target audience: Developers and decide makers, who what to understand what can be done with WPF and how easy you can do it.

Understanding Reflection (400)

This is also new session for lazy developers. It’s not only about what reflection is or what’s new about reflection in latest frameworks (including .NET 3.5 and Silverlight), but also how to use it to make developer’s life easier. We’ll enter a bit into IL to understand what’s going on under the hoods, but most of session is about appliance of this technology for everyday developers’ tasks and challenges.

Target audience: Developers, have an experience with .NET programming

WPF Performance (400)

Session very similar to one, I had in Dev Academy 2. However this time it will focus on performance enhancements in .NET framework 3.5 SP1. I’ll speak about virtualization, parallel processing, DX surface direct access and more…

Target audience: Developers, have an experience with WPF development.

Game Development Using Microsoft’s Latest Technologies (300)

Fun session, I had in TechEd Israel with very complicated setup. Here the sneak preview of how it looks like. It listed as a 300 level, because the fact, that except this session’s fun, you can learn a lot of new there.

Target audience: Everyone, who love technology and want to have fun hour in the morning before advanced sessions will begin.

If you’re reading my blog, and you’re going TechEd Africa. Come and say me hello, ‘cos it would be really nice to see the faces of the people I’m writing to in this blog :)

More information about other sessions in this TechEd can be found in Ahmed Salijee blog, who is developer evangelist in Microsoft Africa and arranges this event.

See you there.

Thursday, June 12, 2008

Phone history or why I throw my Tytn II

I decided to throw out my HTC TYTN II (Actually AT&T Tilt) and get old Nokia E61 back. Why I’m doing it? Tytn is much better, then old Nokia? It’s 3.75G/HSUPA mobile phone, running latest Windows Mobile 6.1 OS. It also has full QUERTY keyboard, 2.8” LCD monitor, 3MP camera and even very good integrated GPS. Nokia has neither. It’s processor is x4 faster and memory x3 bigger. Why I cannot use it? Why I want my old “keyboard brick” back?

e61

First of all, I need phone. Not “freaky damn good uber extensible device”. I want to push one button to receive/make call, push another button to read/answer email. That’s all I need. I need business phone. I do not want to be worry about battery/alarms/meeting/time offset/current time/something wrong/too much processes/no memory/fault/occasionally shutdown/my ears near end call or mute button and all other “goodies” come with TYTN 2 device. I want to be able to dial number without looking on device. I want to be able to do it either when its sunny day outside. I want to push one button to refuse receive call, send “I’m sorry” SMS and turn ring off simultaneously. And I do not want to reinstall ROMS to figure one with small amounts of bugs and then reinstall 300 programs that allows me to do it. I want business phone, that knows what I need.

Just see the regular flow phone usage – make call:

  1. Click power/unlock button
  2. Enter password (there is exchange policy). To do this you have to look on screen. If you wont you’ll absolutely unable to know where each button on screen. Windows mobile using different keyboard for lock and phone utility.
  3. You should press left hardware button. It is not very easy task, ‘cos if your phone doing something now, you’ll wait for response between 1-2 seconds. If you’ll press it twice – you’ll arrive into calendar utility (only for this layout everyone in UX team of Windows Mobile should be fired.
  4. Press Phone button opens dialer utility. If you want any of your last incoming/outgoing/missed calls, you should press another soft button on screen (up jog button not always responses as required)
  5. Choose phone to call (another non-responsive hardware up/down buttons) and then
  6. Press middle big button…
  7. Nothing happes… “OK” button?
  8. You arrived to the contact information (I want to call)!!! Just side note, Windows Mobile is very smart system and if you have more, then one number per contact (work/mobile/office/text) it will call this number by default forever.
  9. Finally I choose a number I want to call (if you choose Text field of contact it brings your SMS interface instead of dialer) and calling the contact
  10. Busy… Redial? Automatic redial? Nothing. Now you should keep sitting and trying to process all above steps each time you want to redial…

Very useful, very easy tool. Isn’t it? Now let’s call the contact with E61

  1. Click unlock button
  2. Enter password (your keyboard is always the same and you should not look into it to dial 5 button is marked)
  3. Move jog up
  4. Move jog down
  5. Move your finger left and up (each button has its unique profile and you can feel it)
  6. Dial
  7. Busy? E61 will redial for you until it’ll catch the contact or you’ll cancel operation. You even do not need to hold phone near ear. Once it success, you’ll hear gentle sound from external speaker.

Should not it work this way? It should, because it is phone, not PDA device.

What about exchange synchronization? Works perfectly. I do not want E61I (successor of E61) it much slower and bugger, then E61. I’m waiting for E71 (smaller) to see if it good for me. but meanwhile, I’m paying $300 to get my E61 back. Someone want to buy my Tilt? Bid in comments.

All above is the reason I do not want IPhone. It’s toy. Very cool and beautiful toy. It is not tool I need everyday.

P.S. I think Microsoft should think a lot about Windows CE 5.x, used as WM. It is not OS for phones, it’s OS for devices with some tools to be able to make calls. Microsoft never be the favorite of mobile market (like Steve Ballmer want it to be), unless they understand, that CE is not operation system for phones. Just in case, currently Nokia holds 33% of the market, next is Motorola (20%), and Samsung (13%). Pay attention all three companies have phone operation system. It’s not about coolness of the device. It’s all about usability of tools.

P.P.S Yes, it’s much easier to find or develop additional tools for Windows Mobile, rather then for Symbian. But I’m ready to pay this bill if I’ll be able to use my phone as phone.

AT&T Tilt

Thursday, June 05, 2008

Backup and restore your wireless networks settings by using WirelessMigrator

I had to reinstall my working notebook, so I begun to backup all it’s settings. I almost finished, when recognize, that Windows Vista has no tool for backup and restore wireless networks settings. You can manually add or remove it. You can even change the priorities, but you cannot backup or restore it.

 image

What to do? How to save all my passwords for networks and all certificates. Digging a bit deeper I found a way to do it, by using command line prompt.

“netsh wlan show profiles” will show you all wireless network profiles in your system
”netsh wlan export profile name=”name” folder=”folder”” will export each profile to xml file (you can also run netsh wlan export profile” to export them all as bunch
”netsh wlan add profile filename=”name”” will restore each one of profiles and returns them into the system

For some reason, I cannot see my mother doing it… More then this, I cannot see myself remember all those command and doing it manually for each one of saved profiles (and I have a lot of them)

What’s the solution? Build handy tool! I’m developer after all and know to solve my and other’s problems by code.

Let me introduce you WirelessMigrator

What is WirelessMigrator? Wireless Migrator is a handy small program, that knows to backup and restore all wireless networks setting from your computer by one click. For some reason, there is no way to do it by using regular Windows Vista tools.
This feature is extremely useful, when you have to reinstall your computer or use the same settings of wireless networks for different machines. In order to use the program, all you have to do is to run it once. The program generate small file, can be handled and transferred in diskette. Later if you'll run this generated file, all settings of wireless networks will be restored on target machine.

Run “BackupWireless.exe” to backup

image

And “RestoreWireless.wnb” to restore

image

That’s all, folks. Now you can save and restore your settings for wireless networks for migration easily.

Download Wireless Migrator >>

At first run, the program will request elevation on Windows Vista, to assign backup archive extension with the program and be able to restore with one click. To completely remove all registry nodes, wrote by program, from the registry, use BackupWireless.exe /remove option. To reinstall the program, just run it for the first time. That’s what I’m calling SmartClient. This is not “real” installation it also not very “web” application.

WirelessMigrator has very advanced and smart user interface

Now a little bit about the user interface of this program. I though a lot about it and decided not to make any user interface for it. Theoretically, it was possible to make kind of “Funky-Vista-Glow” list of all available networks and three buttons “Backup”, “Restore” and “Cancel”. I even done it with half an hour in WPF. But wait a moment. Is it really necessary to have user interface for such program? It wont be more functional by having it. All it have to do, done automatically and you have nothing to do if something going wrong.

So, I build text-only progress bar and key switches to show progress (with will not take more, then 3 seconds), but that’s all. ‘m really interested to know what do you think about it?

Download Wireless Migrator >>

Your feedback is really important for me. Please take a moment and tell me what’s good and what’s bad with this program in order me to be able to continue it’s development. Full source of the program is available under MS-PL from CodePlex.

My other open source projects, you may be interested with

Have a nice day and be good people.

Quick note: New TechEd downloads

There is TechEd in Orlando, and this means, that there are a lot of new announcements. Let’s fill up our download managers with expensive fuel and start.

Silverlight 2.0 beta 2 + Microsoft Expression Blend 2.5 June preview will be available for download very soon. Keep watching. Meanwhile, you can start learn about new TabControl, VisualStateManager, new templating system and cross-domain policy from Tim Heuer’s blog. Also there are some news about event bubbling in beta 2 in Jesse’s blog.

Wednesday, June 04, 2008

Silverlight accessibility and CEO support for beta 2

Yesterday, beta 2 of Silverlight was officially announced in TechEd Orlando. There are a lot of interesting changes. One of most significant changes, I want to notice and accessibility support in Silverlight. See yourself (if you do not know what this image about, see this post)

image

What should you do in order this to happen? Absolutely nothing. This is build in feature in Silverlight 2.0 b2. It’s not like WPF, where you should use Automation namespace boundary. This just works. You can read the Silverlight content with screen narrators. Great respect to dev team.

Why this CEO friendly? Come to my Silverlight half day session at July, 30 to learn why.

Regarding other features, there is new templating model in Silverlight, named VisualStateManager. It can save your time in controls development. Do you remember me speaking about State oriented programming in Silverlight, rather, then KeyFrames oriented programming in Flesh? That what is it.

if (SomethingHappened) {
VisualStateManager.GoToState(this, “SomeState”, true);
}

Also, there is TabControl, text wrapping and scrollbars for TextBox. Regarding DataGrid it become much faster and enhanced by Reordering, Autosize and Sort capabilities.

There are also some security enhancements for Cross-Domain networking and duplex communication. If you not sure about what is it, see this and this post.

Also now you can work with LINQ-to-JSON, ASO.NET DS and SOAP-based data sources.

In additional, there is new XML-based format for DeepZoom MultiScaleTileSource and MultiScaleImage controls.

Have a nice day and be good people.

Monday, June 02, 2008

Just released: Parallel Extensions – June CTP

Today, Parallel Programming team released 2nd CTP for Parallel Extensions to .NET Framework 3.5. Major features in this CTP are declarative parallelist (LINQ-to-Object, LINQ-to-XML), parallel tasks and imperative data and, the most important (for me) – user mode work stealing scheduler. It makes very efficient use of parallel hardware. Additional information regarding this release can be found in team blog. Also, please, report bugs to Connect in order to help those guys to produce better product.

Download June CTP of Parallel Extensions to .NET 3.5 >>