Posts

Showing posts from December, 2008

Mix 10K Coding Challenge - Few Tips I have used to limit the code size

Image
While developing for the  MIX 10K coding challenge , the major challenge to face is to limit the code in 10K size. So I had to question each and every line of code that would it be possible to write this even with fewer bytes.  Check out my application at  http://2009.visitmix.com/MIXtify/TenKDisplay.aspx?SubmissionID=0044  Make sure to run the application in fullscreen mode.  Here I am compiling a list of tips and features I used to reduce the code size.  1.       Automatic Properties - Used this .NET feature to create the Tweet class which represents an RSS feed item from the search result    public class Tweet {   public string Guid { get;set; }   public string Title { get;set; }   public string Author { get;set;     … …. 2.       Object Initializers new Tweet {Title = element.Element("title").Value, Author = element.Element("author").Value, Guid = element.Element("guid").Value}}; 3.       LINQ to XML - I have used this to read the XML stream from...

Mix 10K smart coding challenge

Image
The Mix conference 2009 has organized a coding challenge on Silverlight/WPF with a restriction of using only 10Kb of source code. You can see the gallery of submissions at http://2009.visitmix.com/MIXtify/TenKGallery.aspx . Please visit and cast your vote for the entries you like, You can see my entry here. My application allows you to search the twitter feeds over the internet using Twitter Search APIs(basically same as what you can see at http://search.twitter.com/) What I am trying to acheive here with silverlight is just another way to visualize the search data along the time line travelling towards the negative Z-space . One more interesting feature I wanted to add to this in the future version would be to give the ability to navigate through the Z-space with mouse scroll to see the older results. This same kind of UX(user experience) can be used to view any sort of time based feeds like blog feeds or search results. Architecturally the application is utilizing the following maj...

Paginated ObservableCollection

Image
ObservableCollection class makes the collection binding very easy in Silverlight or WPF. This special collection is aware of the binding infrastructures and notify them whenever some changes happens to the collection. I have often come across the requirement to have  pagination enabled on collections. When we bind a Collection with many items inside to an ItemsControl, the visual will be created for each and every items. But as we can see that there is no big significance in displaying all the data with a huge vertical scroll bar(or similar mechanism) in it. So pagination is the typical user experience strategy we use in this kind of scenarios. Architecturally we can achieve the pagination mainly in three different ways Making the UI Control or Panel aware of the virtualization, so that the visuals wont create at the time of binding. But as an on demand visual element creation. VirtualizingPanel concept in WPF is actually helps to achieve this idea. For more details about WPF virtuali...

XAML Balloon Comments - Expression Blend Tip

Image
It is often a requirement in Silverlight and WPF that to create Balloon kind of UI for Toolip popups. It can be done in many ways. I am listing out few of the common Balloons you might be interested in.   < Grid             < Grid.RowDefinitions >                 < RowDefinition Height ="*"/>                 < RowDefinition Height ="30"/>             </ Grid.RowDefinitions >             < Rectangle RadiusX ="10" RadiusY ="10" Stroke ="#FF000000"/>             < Path Fill ="#FFFFFFFF" Stretch ="Fill" Stroke ="#FF000000" HorizontalAlignment ="Left" Margin ="30,-1.6,0,0" Width ="20" Grid.Row ="1"                 Data ="M22.166642,154.45381 L29.999666,187.66699 40.791059,154.54395"/>             < TextBlock HorizontalAlignment ="Center" V...