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
baffled
baffled
ItemViewer problem Posted: Dec 10, 2009
 

Hi

I'm having a small problem with your excellent ItemViewer control..


I am adding a bunch of FileItems in code, but they all appear on top of each other until something happens to the control: e.g. I have a splitter bar between a TreeView and  ItemViewer and when I nudge that, the entries in the ItemView arrange themselves correctly.

Is there something I should be doing to force that on the initial load?

It's pretty straight forward:


   ivSources.Items.Clear();

            foreach (RSMainService.MetaSource s in list) {

                Liquid.FileItem item = new Liquid.FileItem();

                item.Text = s.sourceName;

                item.Tag = s;

                item.Name = s.accountName + "_" + s.sourceName;

                item.Icon = @"images/big_doc.png";

                

                ivSources.Items.Add(item);

            }


Thanks

 
 
dan
dan
RE: ItemViewer problem Posted: Dec 14, 2009
 

Hi,


This a strange bug, you could try calling UpdateLayout() as this usually forces Silverlight to arrange its child elements.


Thanks!

 
 
senthamarai
senthamarai
RE: ItemViewer problem Posted: Mar 28, 2010
 

I have the same problem.  I tried with UpdateLayout(), it does not work.


I see RenderSize and DesiredSize properties are having a value of (0, 0), but the ones I added through XAML are having (174, 54).  


Any workaround?


Thanks!

 
 
Laymain
Laymain
RE: ItemViewer problem Posted: May 28, 2010
 

I had the same problem but a found the solution, do not use ivSources.Items

Here for your case :


ivSources.Clear();

foreach (RSMainService.MetaSource s in list)

{

        ivSources.Add(new Liquid.FileItem()

        {

                Text = s.sourceName,

                Tag = s,

                Name = s.accountName + "_" + s.sourceName,

                Icon = @"images/big_doc.png"

        });

}



And for better perfomance you can create a List at first

ivSources.Clear();

var lst = new List<Liquid.ItemViewerItem>();

foreach (RSMainService.MetaSource s in list)

{

        lst.Add(new Liquid.FileItem()

        {

                Text = s.sourceName,

                Tag = s,

                Name = s.accountName + "_" + s.sourceName,

                Icon = @"images/big_doc.png"

        });

}

ivSources.Add(lst);

 
 

Rate this: 

1 Star 2 Star 3 Star 4 Star 5 Star
10 Ratings / 3.0 Average