Steve’s Weblog

I Live with Light!

VS2010 beta + Silverlight 3

Posted by 3water on July 27, 2009

I have installed VS 2010 beta and Silverlight 3 SDK also Silverlight 2 SDK but the problem is I can’t debug my application.

It keeps showing “Unable to Start Debugging. The Silverlight managed debugging package isn’t installed“.

Finally the problem can be solved by installing Developer Runtime

for Silverlight 2 download here

for Silverlight 3 download here

Enjoy building application now ;-)

Posted in Uncategorized | Leave a Comment »

Microsoft Tag

Posted by 3water on July 24, 2009

Microsoft Tag API announcement

Microsoft Tag is a mobile application that enables users to link almost anything in the real world to more information or to an interactive experience on the mobile device. Microsoft Tag client software installed on the mobile device allows the owner to use the device’s camera to scan or take a picture of (“snap“) a Tag barcode, then accesses the information associated with the Tag on the mobile device. Businesses can use Microsoft Tag to interact with their customers like never before, using physical media such as print catalogs or POS displays as the launching point. Tag owners create and manage Tags at the Microsoft Tag Web site, http://tag.microsoft.com/ManageAds.aspx.

The Microsoft Tag API allows anyone to create Tag from the web, the desktop, mobile devices.

 

It just like the barcode used it japan, same idea but different inplementation. That’s the innovation =)

So, let’s get started now 

  1. Sign-up if you are a new Tag user
  2. Apply for an API key.
  3. Getting Started with Tag Web Services
  4. View the documentation
  5. Provide feedback or questions

 

Reference:http://blogs.msdn.com/tag/archive/2009/07/23/microsoft-tag-api-announcement.aspx

Posted in Uncategorized | Leave a Comment »

3D in Silverlight 3 (beta)

Posted by 3water on March 21, 2009

As I know, many are waiting for the release of Silverlight 3 Beta. I just heard it from someone, I dont exactly remember who he/she is. Then I go and download the Tools and try things out.

Of course, we should know the definition of XYZ plane before we do our code.

It is the common one as in Silverlight 3. Vertical is the y-axis. Horizontal is the x-axis. And into and out of computer screen is defined as Z-axis.

Here comes to the next part.

Before doing 3D graphics in Silverlight 3, you should know what is ,in fact, handling the work. It is the PlaneProjection Class.
It is put inside the Windows.Media Namespace. Inside the class, there are twelve members.

  • GlobalOffsetX
  • GlobalOffsetY
  • GlobalOffsetZ
  • LocalOffsetX
  • LocalOffsetY
  • LocalOffsetZ
  • RotationX
  • RotationY
  • RotationZ
  • CenterOfRotationX
  • CenterOfRotationY
  • CenterOfRotationZ

Now, I will introduce them briefly.

How to add them in UIElement?

As I said before, it is put under the PlaneProject. For every element in XAML, you should put like this.

        <Image Source=”Waterfall.jpg” Width=”200″ Height=”150″>
            <Image.Projection>
                <PlaneProjection RotationX=”-50″/>
            </Image.Projection>
        </Image>

It is easiest one. Becareful for the positive and negative side to the Rotation.

    <UserControl.Resources>
        <Storyboard x:Name=”myRotation”>
            <DoubleAnimation Duration=”0:0:5″ From=”0″ To=”360″ Storyboard.TargetName=”myPic” Storyboard.TargetProperty=”(UIElement.Projection).(PlaneProjection.RotationY)” AutoReverse=”True”/>
        </Storyboard>
    </UserControl.Resources>

Here, you should have the image at all.

        <Image x:Name=”myPic” Source=”Waterfall.jpg” Width=”200″ Height=”150″ Margin=”80,0,120,150″>
            <Image.Projection>
                <PlaneProjection GlobalOffsetZ=”-2000″ RotationY=”0″ CenterOfRotationY=”0.1″/>
            </Image.Projection>
        </Image>

This is an example for revolve about Y-axis. Try to press F5 now!! Of course, you should add the myRotation.Begin() in Loaded Event so as to start the animation.

Oh, and please feel free to visit here and get a brief concept about different properties and Silverlight 3 beta.

http://samples.msdn.microsoft.com/Silverlight/SampleBrowser/index.htm

More will be released here. Keeping visting my blog =)

SteveWong (Hong Kong)

Posted in Uncategorized | Leave a Comment »

TestPostAgain

Posted by 3water on November 17, 2008

Posted in Uncategorized | Leave a Comment »

We can live without Motion Path

Posted by 3water on November 15, 2008

For Silverlight, many agree it is not perfect enough coz it doesnt include many features that inside WPF. Well, as we all know, Silverlight is an engine for us to create a web-based program/application. In my opinion, being a web-based application, it should be lite but not simple of course. As I remember, last week, someone ask how to create a motion path in Silverlight in order to make a picture flying around an ellipse (circular motion). Yesterday, another post has been created where people keep on discussing the problem of silverlight without motion path.

I think all we can do is to relate Math and Programming together.
Fortunately, my PureMath teacher has taught about a set of parametric equations which declare a path of circle. Then I try to implement it on Silverlight. Finally, it works, and I my extremely happy with that. Here is the solution.

XAML

    <UserControl.Resources>
        <Storyboard x:Name="myStory_Ellipse">
            <DoubleAnimation x:Name="Ellipse_ani_X" Duration="00:00:00.001" Completed="Ellipse_ani_X_Completed"  Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" />
            <DoubleAnimation x:Name="Ellipse_ani_Y" Duration="00:00:00.001" Completed="Ellipse_ani_Y_Completed"  Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" />
        </Storyboard>
    </UserControl.Resources>

        <Ellipse Height="50"  Width="50" Stroke="#88FFDDDD"  Canvas.Top="0" Canvas.Left="-200" RenderTransformOrigin="0.5,0.5" x:Name="ellipse">
            <Ellipse.Fill>
                <LinearGradientBrush StartPoint="0.5, 0"  EndPoint="0.5, 1">
                    <GradientStop Color="#00FFFFFF"  Offset="0.0" />
                    <GradientStop Color="#FF000000"  Offset="1.0" />
                </LinearGradientBrush>
            </Ellipse.Fill>
            <Ellipse.RenderTransform>
             <TransformGroup>
              <ScaleTransform/>
              <SkewTransform/>
              <RotateTransform/>
              <TranslateTransform X="0" Y="0"/>
             </TransformGroup>
            </Ellipse.RenderTransform>
        </Ellipse>

C#:

        int t = 0;
        double AniX;
        double AniY;

        void Page_Loaded(object sender, RoutedEventArgs e)
        {
            Ellipse_ani_X.From = Ellipse_ani_Y.From = 0;
            Ellipse_ani_Y.To = Ellipse_ani_X.To = AniX = AniY = 0;
            t++;
            myStory_Ellipse.Begin();
        }

        private void Ellipse_ani_X_Completed(object sender, EventArgs e)
        {
            myStory_Ellipse.Stop();
            Ellipse_ani_X.From = AniX;
            Ellipse_ani_X.To= AniX = Math.Cos(t * Math.PI / 50 ) * 100;
            Ellipse_ani_Y.From = AniY;
            Ellipse_ani_Y.To = AniY = Math.Sin(t  * Math.PI / 50 ) * 100;
            t++;
            myStory_Ellipse.Begin();

        }

        private void Ellipse_ani_Y_Completed(object sender, EventArgs e)
        {

        }

I am trying to work out the motion path solution. I hope it will help all of you.

Regards,
Steve Wong(Hong Kong)
Live with Light!

Posted in Uncategorized | Tagged: , | 3 Comments »

Testing

Posted by 3water on November 15, 2008

Posted in Uncategorized | Tagged: | Comments Off

Standard call to begin StoryBoard

Posted by 3water on July 17, 2008

This is a good remind from Yi-Lun Luo(MSFT) from Silverlight Official Forum

Hello, thanks for reporting this issue. I’ve verified the behavior and notified out product team. The issue appears to be: If you use Storyboard.SetTarget to set the target for an animation, if the property path is quite complex, the target will be lost after you begin the Storyboard. If you manually set the target before each Storyboard begins, it will work fine:

Storyboard.SetTarget(s1.Children(0), recMain)
s1.Begin()

Also you can use SetTargetName instead of SetTarget. If your objects are dynamically created, you can write something like this:

recMain.SetValue(FrameworkElement.NameProperty, “rec”)
Storyboard.SetTargetName(d, “rec”)

Yes [Y]Yes [Y]Yes [Y]Yes [Y]Yes [Y]Yes [Y]

Posted in Uncategorized | Tagged: , | Leave a Comment »

MIX 08 HongKong

Posted by 3water on July 11, 2008

After participating MIX Essentials 08.. I got a book ahha But it is quite similar to the last edition introducing Silverlight 1.0

Well, today I met Harris Andy and Angela I knew them coz they are the judges of ImagineCup local

But they are not the main point. The most important is the content. It’s very well. Awesome!
Especially the video talking about how Microsoft technologies get around in our lives! Well Done! I should try hard to find that video =]

By the way the examples shown today are good and some of them include good ideas.

All in all, Wonderful! Well, I should work hard and try to get into Microsoft haha(daydreaming again!)

Posted in Uncategorized | Tagged: | Leave a Comment »

Months after Imagine Cup 08

Posted by 3water on July 11, 2008

Well, after paticipating Imagine Cup 08 I learnt a lot.

Working with 3 other schoolmates, Chung, Peter and Timothy, they have their own expertise… And we continue to implement our work in C#. Newly adding Windows Communication Foundation (WCF) and Silverlight, I take up the role to learn Silverlight and Peter responsible for the WCF. Our project seems to be very good together with our good idea and the new technology. It does consume most of my time. I sepnt a day to read the Introducing Microsoft Silverlight 1.0 from Lawrence Moroney and spent a week to read the Developing Windows-Based Applications with Visual C#.NET. I think it should be a miracle coz I am just a secondary student now. =]

After knowing all the foundation of Silverlight and C# I started making the WebPage I was responisble for. It is extremely difficult for me to handle this new technology Silverlight 2.0, luckily I did some project using Flash and know some algorithm DFS BFS… etc They should take some advantage for me.

When all of us think our project is very poor at least worse than last year’s one, the judges from Microsoft said, “oh quite good” … and they came forward to have a look on the RFID Card and Receiver. We are surprised … shocked …

When we entered the final in Local, we meet our rival using lots of new technologies including GPS… UMPC …EeePC etc well and a home-made Carbon Dioxide meter (I think that’s not made by them ahha)

Finally, we got 2nd.. I know we had all done very well, especially Thanks for Angela Ip =]

It gives me so much experience in Computer Programming and since then I started answering question on SIlverlight forum. That’s worth !Not only does it earn points (that’s very minor for me) but also let me know how much I know now. It is just like a chapter checkpoint. People having different kinds of question and ask in the forum just like some guys who are giving me a Test with many different chapter in a big subject SILVERLIGHT =]

I think we should treasure the chance to learn and the chance to compete!

By the way, my academic result is having the trend of dorpping down… /.\ so I must work hard!

Posted in Uncategorized | Tagged: | Leave a Comment »

To Do List

Posted by 3water on July 10, 2008

Well, I have quite a bit to do these days becoz I want to try as much as I can in this Summer Holiday

Of course I will have some time for my academic preparation

Things to do are as follow, and I have no idea for each item at all. If you do have, please tell me or kindly comment here

  1. Prepare for the ImagineCup2009 (think of the toughest question that we are facing now)
  2. Linking Windows LiveID Authentication and Silverlight together
  3. create a useful little silverlight application (theme hasnt been decided)
  4. take a deep look into working ADO.NET with Silverlight (know quite a little bit)
  5. learn more about PopFly (I know nothing about it)
  6. Create a game on Silverlight(the least priority)
  7. To be a MVP (daydreaming…)

Hopefully, I can do much much…better than now after a few year… Fortunately, I am just 17 years old now =] still have a few of time

Steve Wong (Hong Kong)
Live with Light

Posted in Uncategorized | Tagged: | 2 Comments »