Vectorlight News

  • Chat App Converted to HTML and JQuery
    Sep 08, 2011

    Converted from Silverlight to HTML and Javascript/JQuery is the Vectorlight Chat App. Login using your Vectorlight password to chat using your username and avatar.

  • HTML5 iPhone,Android Big Guns Tower Defense
    Jul 02, 2011

    Big Guns has made the leap from Windows Phone 7 (XNA) to HTML5 so you can now play it on your iPhone, Android and other HTML5 compatible devices.

  • HTML5 Games - Word Poppers and Batty
    Jun 04, 2011

    As the take-up of HTML5 quickens (74% of users currently have a browser capable of HTML5 Canvas) we present two more games for both your browser and mobile.

  • Big Guns Tower Defense on Windows Phone 7
    May 06, 2011

    Coming soon to Windows Phone 7 is an XNA port of the popular Vectorlight tower defense game Super Tower Defense. Whilst retaining many of the graphical and gameplay features of the original Silverlight game.

  • Wakacube WP7 Update
    Apr 26, 2011

    Released to the Windows Phone 7 marketplace today is Version 1.1 of Wakacube the 3D physics game of skill. Included in the update are more levels (30 in total) and new mode Wakatime which generates random crate structures to keep players entertained long after the levels have been completed.

  • Home Page News
Jab_Derm
Jab_Derm
Viewer Mods & Bug Fix Posted: Oct 27, 2011
 

Hello,


I have made a couple of mods to the viewer control that I thougt I would share.  I have also fixed a bug I was having.


Mods...

Line 218 - I removed the -60 so that the slider sits below the image, I didn't want the slider over the image.

ElementSliderGrid.SetValue(Canvas.TopProperty, RenderSize.Height );   // -60


In the method private void ElementContent_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)

I added the line Cursor = Cursors.Hand;


In the method private void ElementContent_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)

I added the line Cursor = Cursors.Arrow;


I may add an ElementContent_MouseOver method and just put the change in there.



Bug

When I placed the control into the designer I kept getting NullReferenceExceptions thrown as soon as I displayed the designer. It was complaining about the event handler setters in the code.  I wrapped the setters like this

            if (!IsDesignTime())

            {

                ElementContent.MouseLeftButtonDown += new MouseButtonEventHandler(ElementContent_MouseLeftButtonDown);

                ElementContent.MouseLeftButtonUp += new MouseButtonEventHandler(ElementContent_MouseLeftButtonUp);

                ElementContent.MouseMove += new MouseEventHandler(ElementContent_MouseMove);

                ElementContent.SizeChanged += new SizeChangedEventHandler(ElementContent_SizeChanged);

                ElementSliderX.Value = Zoom;

                ElementSliderX.ValueChanged += new RoutedPropertyChangedEventHandler<double>(ElementSliderX_ValueChanged);

                ElementSliderGrid.MouseEnter += new MouseEventHandler(ElementSliderX_MouseEnter);

                ElementSliderGrid.MouseLeave += new MouseEventHandler(ElementSliderX_MouseLeave);

            }

        

         private bool IsDesignTime()

        {

            return DesignerProperties.GetIsInDesignMode(Application.Current.RootVisual);

        }


This stopped the error from occuring.


Thanks for some excellent controls.

Jim

 
 
Bugger
Bugger
RE: Viewer Mods & Bug Fix Posted: Nov 29, 2011
 

Hi, I want to remove those eventhandlers so you can only use the slider. But I dont know how I have to use the source code.


When I add the source code files to my project I cant use them.

 
 
Jab_Derm
Jab_Derm
RE: Viewer Mods & Bug Fix Posted: Dec 12, 2011
 

You don't include his code into your project.

After you have changed his code in it's own project and recompiled it to build a new library include the new library in your code and you will see your changes.


Jim