Thursday, March 8, 2012

Windows 8 – the New Site for Silverlight Programmers - Silverlight Application to Windows 8 Metro Style Application

Right now I don’t have much feeling to speak about surface computing and Silverlight. I have much more feeling about Windows 8! Yes Windows 8 is a new game of HTML/JavaScript, Metro UI, Pointer, Animation, Effective business Application, Dashboard. It has the ability to run HTML/JavaScript directly on the desktop. Its Windows reimagined and reinvented from a solid core of Windows 7 speed and reliability. I’m not much worried about a welcome screen snowed under touch screen with full of Tiles for each app directly. Being a hard code .net Presentation Framework programmer I bet Metro UI is going to open good market place for Silverlight/WPF programmers. Microsoft Silverlight browser plug-in is strong enough framework and maintained wisely to kick flash! Remember about “out of browser” capabilities of Silverlight. I believe Microsoft already planed for Windows 8 before introducing Silverlight in Market. Silverlight is used and tested by thousands and thousands of users. Framework is strong enough now. I’m sure it will take very less time  for a programmer to port Silverlight into Desktop completely.

Following are few required changes to be done while converting/porting Silverlight application to Metro Style application.

  1. Namespace changes: System.Windows should be replaced by Windows.UI.Xaml in all classes.
  2. Few APIs/concepts where removed in the Metro Style framework. It includes Effects, OpacityMask, Easing Functions etc.
  3. No MouseEvents: There are no mouse-specific input events such as MouseLeftButtonDown. Instead it provides PointerPressed, PointerReleased, PointerEntered or PointerExited events.
  4. XAML namespace changes: Now XAML namespaces no longer reference specific assemblies.
  5. No support for TypeConverter yet.
  6. No support yet for RadialGradientBrush in Metro Style app.


Tuesday, January 10, 2012

Selecting Right Charting Component for Windows Phone or Desktop or Web Application

How do I choose a charting component? Do you think selecting the Right Chart Control is really hard! Here I will help you to make it more easier.

Well before you select a charting component you should be very careful about the following things.

  1. First make sure that the chart looks smart and beautiful (For Enterprise grade application).
  2. Smooth and smart animation to impress your boss and clients.
  3. What data you are going to visualize in the Chart? It’s always better to select a charting component which supports all chart types in one binary/component.
  4. Few commonly used chart types are - Pie, Column, Bar, Line, Spline, Area, Stacked Charts and combination charts etc. Checkout the list here.
  5. Do not overlook styling and Theme options.
  6. Make sure its faster.
  7. It must support few basic features required to create an enterprise application or dashboard.
         •   Must be easier to use (This will reduce your development time).
         •   Must support switching one chart type to another just setting one property.
         •   Events on any elements present in chart (Required for creating drilldown charts)
         •   Supply data at one shot
         •   Real-time update
         •   Partial update (Real-time without updating the whole chart)
         •   Good documentation.


If you consider the above points while purchasing a charting component hope you will be able to select right chart control for your applicaton.

According to my experience I can say Visifire is the best charting component which meets all the above requirements. Currently Visifire works with Silverlight, Windows Phone, WPF, XBAP, win-form application, any web-application, JQuery, SharePoint and so many..

Few Important  links

Sunday, February 14, 2010

A new ColorSet for Visifire Silverlight and WPF Charts

I have created a new ColorSet for Visifire Silverlight and WPF Chart. Hope you guys will like it.




If you are working with managed code programming in Silverlight/WPF, you can go through the link from Visifire documentation here.

Enjoy! :).

Friday, July 4, 2008

Breaking Changes for Silverlight 2 Beta 2

Breaking Changes for Silverlight 2 Beta 2 (corrections and additions)

With Silverlight 2 Beta 2 coming out there were a number of changes that will break applications written for older builds of Silverlight. We published a document that listed these changes and how to fix them (Breaking Changes Between Beta 1 and Beta 2) but this document is now a bit out of date due to corrections/additions made after the document was locked down.

Attached is a more complete up-to-date version of this document. To get this attachment, scroll down to the bottom of this post. Note that I've attached a Word 2007 version and a Word 97-2003 version. In addition, below is a list of changes/additions that might differ between this updated document and those that shiped with the SDK. You can use the attached new version of the document to see the correct changes.

1. Controls no longer allow events to bubble up (in other words, controls eat events). Jesse Liberty's blog Who Ate my MouseDown Event? for more information. Also, the section in the breaking changes doc titled RoutedEventArgs.Handled=true Events No Longer Bubble but it is perhaps not very discoverable under that title.

2. A whole bunch DataGrid breaking changes. The changes are to numerous to list in this post. Download the attached Word file to get them. The online version of the breaking changes doc doesn't have this while the loose Word file that ships with the offline SDK does so you may or may not already have this info depending on your source...

3. Wrong URL in the sample crossdomain.xml file. It should look like this:

crossdomain.xml




"http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">









4. Calendar/DatePicker Changes section is wrong. It should look like this:



Who Is Affected: Those using DatePicker or Calendar.

Summary

The following changes were made to the Calendar and DatePicker.

Calendar

· [Remove] Style DayStyle

· [Remove] Style MonthStyle

· [Removed] EventHandler DateSelected

· [Added] EventHandler SelectedDatesChanged

DatePicker

· [Remove] ToolTip ToolTip

· [Remove] EventHandler TextParseError

· [Added] EventHandler DateValidationError

· [Removed] EventHandler DateSelected

· [Added] EventHandler SelectedDateChanged

Calendar and DatePicker

· [Remove] bool IsEnabled {get; set;}

· [Remove] DateTime? SelectableDateStart

· [Remove] DateTime? SelectableDateEnd

· [Remove] bool AreDatesInPastSelectable





5. System.ServiceModel.ClientBase Changes section is wrong. It should look like this:



Who Is Affected: Those using System.ServiceModel.ClientBase.Open() and Close() or System.ServiceModel.ClientBase.Dispose().

Summary

System.ServiceModel.ClientBase.Open() and Close() and System.ServiceModel.ClientBase.Dispose() were removed.

Fix Required

Workarounds for code using Open():

· [preferred] Don’t call it: on the first web service call we will automatically do Open asynchronously, so you don’t need to call it explicitly.

· [preferred] Change code to use OpenAsync and the OpenCompleted event

· [less preferred] Cast the proxy to ICommunicationObject and use BeginOpen/EndOpen

· [not recommended] Cast the proxy to ICommunicationObject and use Open()

Workarounds for code using Close():

· [preferred] change code to use CloseAsync. The CloseCompleted event is not usually necessary as you don’t usually need notification when Close completes

· [less preferred] don’t call Close at all. Resources used by the proxy will eventually be reclaimed

· [less preferred] Cast the proxy to ICommunicationObject and use BeginClose/EndClose

· [not recommended] Cast the proxy to ICommunicationObject and use Close()

Workarounds for code using Dispose() or the ‘using’ C# pattern:

· [preferred] change code to call CloseAsync

· [less preferred] see other alternatives for Close() above

6. The following was added to the Miscellaneous API changes section:

· XmlAnyElementAttributes class no longer implements Collection, ICollection, IEnumerable, or IList

· XmlArrayItemAttributes class no longer implements Collection, ICollection, IEnumerable, or IList

· XmlElementAttributes class no longer implements Collection, ICollection, IEnumerable, or IList

· System.Runtime.Serialization.ExtensionDataObject class was removed.

· XmlAnyAttributeAttribute class was removed.

· XmlAttributes.XmlAnyAttribute member was removed.

· CodeIdentifier class was removed.

· CodeIdentifiers class was removed.

· Removed: delegate types XmlSerializationCollectionFixupCallback, XmlSerializationFixupCallback, and XmlSerializationReadCallback

· The following protected members of XmlSerializationReader were removed:

o [remove] protected void AddFixup(Fixup fixup);

o [remove] protected void AddFixup(CollectionFixup fixup);

o [remove] protected void AddReadCallback(String name, String ns, Type type, XmlSerializationReadCallback read);

o [remove] protected void AddTarget(String id, Object o);

o [remove] protected void FixupArrayRefs(Object fixup);

o [remove] protected Int32 GetArrayLength(String name, String ns);

o [remove] protected Object GetTarget(String id);

o [remove] protected Boolean ReadReference(out String fixupReference);

o [remove] protected Object ReadReferencedElement(String name, String ns);

o [remove] protected Object ReadReferencedElement();

o [remove] protected void ReadReferencedElements();

o [remove] protected Object ReadReferencingElement(String name, String ns, Boolean elementCanBeType, out String fixupReference);

o [remove] protected Object ReadReferencingElement(String name, String ns, out String fixupReference);

o [remove] protected Object ReadReferencingElement(out String fixupReference);

o [remove] protected void Referenced(Object o);

o [remove] protected void UnreferencedObject(String id, Object o);

o [remove] protected class CollectionFixup; // removed

o [remove] protected internal class Fixup; // removed

· The following protected members of XmlSerializationWriter were removed:

o [remove] protected void AddWriteCallback(Type type, String typeName, String typeNs, XmlSerializationWriteCallback callback);

o [remove] protected void WriteId(Object o);

o [remove] protected void WritePotentiallyReferencingElement(String n, String ns, Object o, Type ambientType, Boolean suppressReference);

o [remove] protected void WritePotentiallyReferencingElement(String n, String ns, Object o, Type ambientType);

o [remove] protected void WritePotentiallyReferencingElement(String n, String ns, Object o, Type ambientType, Boolean suppressReference, Boolean isNullable);

o [remove] protected void WritePotentiallyReferencingElement(String n, String ns, Object o);

o [remove] protected void WriteReferencedElements();

o [remove] protected void WriteReferencingElement(String n, String ns, Object o);

o [remove] protected void WriteReferencingElement(String n, String ns, Object o, Boolean isNullable);

o [remove] protected void WriteRpcResult(String name, String ns);

7. The Scrollviewer template elements changed.

To fix: Go to the ScrollViewer template documentation or re-generate a new default template in Blend 2.5. This will get you the correct names of the template elements.

8. Can't get UI elements by name if hosted in ContentControl (ScrollViewers etc).

9. You can find a workaround for the removal of the WatermarkedTextBox control here: WatermarkedTextBox for Silverlight 2 Beta 2.

Monday, May 12, 2008

Amazing auto label placing in Visifire charts

Visifire is a Silverlight based Open Source data visualization component. Visifire supports Silverlight 2.0. Using Visifire you can easily create good looking charts within minutes. You can create your own charts. But you need to know a bit about HTML only. Visifire supports various chart types.

Currently the following is a list of chart types available in Visifire:
Column, Line, Pie, Bar, Area, Doughnut, Stacked Column, StackedColumn100, Stacked Bar, StackedBar100, Stacked Area, StackedArea100, Bubble and Point. You can have a look at their galleries.

Especially, I would like to tell you about the label placement in Visifire charts. There are so many labels to be placed. But space is less. Visifire team has done a very good work on this problem. In Visifire charts, if chart size is small and there are many DataPoints. Just by doing minor changes in some of the property values for the AxisX element in data, you can place the labels beautifully over the chart.

Here are the key attributes present in the following xml fragment for Visifire Data.xml.

<vc:AxisX Interval="1" LabelAngle="0" >
<vc:AxisLabels Rows="1" FontSize="7"/>
</vc:AxisX>

Here are some screenshots.

Pie Chart

[Data.xml ]
<vc:Chart Theme="Theme3" AnimationEnabled="False"
xmlns:vc="clr-namespace:Visifire.Charts;assembly=Visifire.Charts"
Width="500" Height="310"
Watermark="False" BorderThickness="0" HorizontalAlignment="Center" View3D="false">
<vc:AxisX Interval="1" LabelAngle="0" >
<vc:AxisLabels Rows="1" FontSize="4"/>
</vc:AxisX>
<vc:DataSeries RenderAs="Pie" ShowInLegend="False" Bevel="true" LabelEnabled="true">
<vc:DataPoint AxisLabel="B" YValue="5509"/>
<vc:DataPoint AxisLabel="C" YValue="7047"/>
<vc:DataPoint AxisLabel="D" YValue="10047"/>
<vc:DataPoint AxisLabel="E" YValue="8508"/>
<vc:DataPoint AxisLabel="F" YValue="6022"/>
<vc:DataPoint AxisLabel="G" YValue="9047"/>
<vc:DataPoint AxisLabel="H" YValue="7508"/>
<vc:DataPoint AxisLabel="I" YValue="11222"/>
<vc:DataPoint AxisLabel="J" YValue="5498"/>
<vc:DataPoint AxisLabel="K" YValue="6754"/>
<vc:DataPoint AxisLabel="L" YValue="8756"/>
<vc:DataPoint AxisLabel="M" YValue="2340"/>
<vc:DataPoint AxisLabel="O" YValue="2509"/>
<vc:DataPoint AxisLabel="P" YValue="3047"/>
<vc:DataPoint AxisLabel="Q" YValue="40047"/>
<vc:DataPoint AxisLabel="R" YValue="6508"/>
<vc:DataPoint AxisLabel="S" YValue="7022"/>
<vc:DataPoint AxisLabel="T" YValue="8047"/>
<vc:DataPoint AxisLabel="U" YValue="4508"/>
<vc:DataPoint AxisLabel="V" YValue="1222"/>
<vc:DataPoint AxisLabel="W" YValue="598"/>
<vc:DataPoint AxisLabel="X" YValue="4754"/>
<vc:DataPoint AxisLabel="Y" YValue="856"/>
<vc:DataPoint AxisLabel="Z" YValue="340"/>
<vc:DataPoint AxisLabel="A1" YValue="947"/>
<vc:DataPoint AxisLabel="B2" YValue="7408"/>
<vc:DataPoint AxisLabel="C2" YValue="1322"/>
<vc:DataPoint AxisLabel="D2" YValue="5798"/>
<vc:DataPoint AxisLabel="E2" YValue="6254"/>
<vc:DataPoint AxisLabel="F2" YValue="8726"/>
<vc:DataPoint AxisLabel="G2" YValue="3340"/>
<vc:DataPoint AxisLabel="H2" YValue="9047"/>
<vc:DataPoint AxisLabel="I2" YValue="7538"/>
<vc:DataPoint AxisLabel="J2" YValue="1322"/>
<vc:DataPoint AxisLabel="K2" YValue="5698"/>
<vc:DataPoint AxisLabel="L2" YValue="6954"/>
<vc:DataPoint AxisLabel="M2" YValue="8256"/>
<vc:DataPoint AxisLabel="N2" YValue="2540"/>
<vc:DataPoint AxisLabel="O2" YValue="9067"/>
<vc:DataPoint AxisLabel="P2" YValue="7528"/>
<vc:DataPoint AxisLabel="Q2" YValue="1522"/>
<vc:DataPoint AxisLabel="R2" YValue="5298"/>
<vc:DataPoint AxisLabel="S2" YValue="6754"/>
<vc:DataPoint AxisLabel="T2" YValue="8856"/>
<vc:DataPoint AxisLabel="U2" YValue="2240"/>
<vc:DataPoint AxisLabel="V2" YValue="9027"/>
<vc:DataPoint AxisLabel="W2" YValue="7228"/>
<vc:DataPoint AxisLabel="X2" YValue="13222"/>
<vc:DataPoint AxisLabel="Y2" YValue="5498"/>
<vc:DataPoint AxisLabel="Z2" YValue="6554"/>
</vc:DataSeries>
</vc:Chart>


Column Chart

[Data.xml ]
<vc:Chart Theme="Theme3" AnimationEnabled="False"
xmlns:vc="clr-namespace:Visifire.Charts;assembly=Visifire.Charts"
Width="500" Height="310"
Watermark="False" BorderThickness="0" HorizontalAlignment="Center" View3D="false">
<vc:AxisX Interval="1" LabelAngle="0" >
<vc:AxisLabels Rows="2" FontSize="8"/>
</vc:AxisX>
<vc:DataSeries RenderAs="Column" ShowInLegend="False" Bevel="true" LabelEnabled="true">
<vc:DataPoint AxisLabel="B" YValue="5509"/>
<vc:DataPoint AxisLabel="C" YValue="7047"/>
<vc:DataPoint AxisLabel="D" YValue="10047"/>
<vc:DataPoint AxisLabel="E" YValue="8508"/>
<vc:DataPoint AxisLabel="F" YValue="6022"/>
<vc:DataPoint AxisLabel="G" YValue="9047"/>
<vc:DataPoint AxisLabel="H" YValue="7508"/>
<vc:DataPoint AxisLabel="I" YValue="11222"/>
<vc:DataPoint AxisLabel="J" YValue="5498"/>
<vc:DataPoint AxisLabel="K" YValue="6754"/>
<vc:DataPoint AxisLabel="L" YValue="8756"/>
<vc:DataPoint AxisLabel="M" YValue="2340"/>
<vc:DataPoint AxisLabel="O" YValue="2509"/>
<vc:DataPoint AxisLabel="P" YValue="3047"/>
<vc:DataPoint AxisLabel="Q" YValue="40047"/>
<vc:DataPoint AxisLabel="R" YValue="6508"/>
<vc:DataPoint AxisLabel="S" YValue="7022"/>
<vc:DataPoint AxisLabel="T" YValue="8047"/>
<vc:DataPoint AxisLabel="U" YValue="4508"/>
<vc:DataPoint AxisLabel="V" YValue="1222"/>
<vc:DataPoint AxisLabel="W" YValue="598"/>
<vc:DataPoint AxisLabel="X" YValue="4754"/>
<vc:DataPoint AxisLabel="Y" YValue="856"/>
<vc:DataPoint AxisLabel="Z" YValue="340"/>
<vc:DataPoint AxisLabel="A1" YValue="947"/>
<vc:DataPoint AxisLabel="B2" YValue="7408"/>
<vc:DataPoint AxisLabel="C2" YValue="1322"/>
<vc:DataPoint AxisLabel="D2" YValue="5798"/>
<vc:DataPoint AxisLabel="E2" YValue="6254"/>
<vc:DataPoint AxisLabel="F2" YValue="8726"/>
<vc:DataPoint AxisLabel="G2" YValue="3340"/>
<vc:DataPoint AxisLabel="H2" YValue="9047"/>
<vc:DataPoint AxisLabel="I2" YValue="7538"/>
<vc:DataPoint AxisLabel="J2" YValue="1322"/>
<vc:DataPoint AxisLabel="K2" YValue="5698"/>
<vc:DataPoint AxisLabel="L2" YValue="6954"/>
<vc:DataPoint AxisLabel="M2" YValue="8256"/>
<vc:DataPoint AxisLabel="N2" YValue="2540"/>
<vc:DataPoint AxisLabel="O2" YValue="9067"/>
<vc:DataPoint AxisLabel="P2" YValue="7528"/>
<vc:DataPoint AxisLabel="Q2" YValue="1522"/>
<vc:DataPoint AxisLabel="R2" YValue="5298"/>
<vc:DataPoint AxisLabel="S2" YValue="6754"/>
<vc:DataPoint AxisLabel="T2" YValue="8856"/>
<vc:DataPoint AxisLabel="U2" YValue="2240"/>
<vc:DataPoint AxisLabel="V2" YValue="9027"/>
<vc:DataPoint AxisLabel="W2" YValue="7228"/>
<vc:DataPoint AxisLabel="X2" YValue="13222"/>
<vc:DataPoint AxisLabel="Y2" YValue="5498"/>
<vc:DataPoint AxisLabel="Z2" YValue="6554"/>
</vc:DataSeries>
</vc:Chart>



Line Chart

[Data.xml ]
<vc:Chart Theme="Theme3" AnimationEnabled="False"
xmlns:vc="clr-namespace:Visifire.Charts;assembly=Visifire.Charts"
Width="500" Height="310"
Watermark="False" BorderThickness="0" HorizontalAlignment="Center" View3D="false">
<vc:AxisX Interval="1" LabelAngle="0" >
<vc:AxisLabels Rows="2" FontSize="8"/>
</vc:AxisX>
<vc:DataSeries RenderAs="Line" LineThickness="1.5" Color="Red" ShowInLegend="False" Bevel="true" LabelEnabled="False">
<vc:DataPoint AxisLabel="B" YValue="5509"/>
<vc:DataPoint AxisLabel="C" YValue="7047"/>
<vc:DataPoint AxisLabel="D" YValue="10047"/>
<vc:DataPoint AxisLabel="E" YValue="8508"/>
<vc:DataPoint AxisLabel="F" YValue="6022"/>
<vc:DataPoint AxisLabel="G" YValue="9047"/>
<vc:DataPoint AxisLabel="H" YValue="7508"/>
<vc:DataPoint AxisLabel="I" YValue="11222"/>
<vc:DataPoint AxisLabel="J" YValue="5498"/>
<vc:DataPoint AxisLabel="K" YValue="6754"/>
<vc:DataPoint AxisLabel="L" YValue="8756"/>
<vc:DataPoint AxisLabel="M" YValue="2340"/>
<vc:DataPoint AxisLabel="O" YValue="2509"/>
<vc:DataPoint AxisLabel="P" YValue="3047"/>
<vc:DataPoint AxisLabel="Q" YValue="40047"/>
<vc:DataPoint AxisLabel="R" YValue="6508"/>
<vc:DataPoint AxisLabel="S" YValue="7022"/>
<vc:DataPoint AxisLabel="T" YValue="8047"/>
<vc:DataPoint AxisLabel="U" YValue="4508"/>
<vc:DataPoint AxisLabel="V" YValue="1222"/>
<vc:DataPoint AxisLabel="W" YValue="598"/>
<vc:DataPoint AxisLabel="X" YValue="4754"/>
<vc:DataPoint AxisLabel="Y" YValue="856"/>
<vc:DataPoint AxisLabel="Z" YValue="340"/>
<vc:DataPoint AxisLabel="A1" YValue="947"/>
<vc:DataPoint AxisLabel="B2" YValue="7408"/>
<vc:DataPoint AxisLabel="C2" YValue="1322"/>
<vc:DataPoint AxisLabel="D2" YValue="5798"/>
<vc:DataPoint AxisLabel="E2" YValue="6254"/>
<vc:DataPoint AxisLabel="F2" YValue="8726"/>
<vc:DataPoint AxisLabel="G2" YValue="3340"/>
<vc:DataPoint AxisLabel="H2" YValue="9047"/>
<vc:DataPoint AxisLabel="I2" YValue="7538"/>
<vc:DataPoint AxisLabel="J2" YValue="1322"/>
<vc:DataPoint AxisLabel="K2" YValue="5698"/>
<vc:DataPoint AxisLabel="L2" YValue="6954"/>
<vc:DataPoint AxisLabel="M2" YValue="8256"/>
<vc:DataPoint AxisLabel="N2" YValue="2540"/>
<vc:DataPoint AxisLabel="O2" YValue="9067"/>
<vc:DataPoint AxisLabel="P2" YValue="7528"/>
<vc:DataPoint AxisLabel="Q2" YValue="1522"/>
<vc:DataPoint AxisLabel="R2" YValue="5298"/>
<vc:DataPoint AxisLabel="S2" YValue="6754"/>
<vc:DataPoint AxisLabel="T2" YValue="8856"/>
<vc:DataPoint AxisLabel="U2" YValue="2240"/>
<vc:DataPoint AxisLabel="V2" YValue="9027"/>
<vc:DataPoint AxisLabel="W2" YValue="7228"/>
<vc:DataPoint AxisLabel="X2" YValue="13222"/>
<vc:DataPoint AxisLabel="Y2" YValue="5498"/>
<vc:DataPoint AxisLabel="Z2" YValue="6554"/>
</vc:DataSeries>
</vc:Chart>



Visifire provides online Documentation, Forum, Blogs etc...
For any kind of help or quick-start I suggest you to go through Visifire Charts Documentation.