Working with Converters Silverlight<br />Mahender<br />Senior Software Engineer<br />United Health Group<br />
Mahender Sarangam<br />Having 5 years of experience on .NET Technologies. Working as a Senior Software Engineer in United ...
Converters<br /><ul><li>Silverlight has an excellent data binding engine that allows data to be bound through  XAML or pro...
Most of the today LOB in data binding to format the data displayed in the UI.</li></li></ul><li>Every time We show a date ...
How to Implement<br />Value converters are extremely powerful. They implement IValueConverter, and they have two methods: ...
public class TestClass : Control<br />{<br />[TypeConverter(typeof(BorderTypeConverter))]<br />public Border Border<br />{...
Demo<br />
			Thank you<br />
Upcoming SlideShare
Loading in …5
×

Silverlight converters

638 views
611 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
638
On SlideShare
0
From Embeds
0
Number of Embeds
24
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Silverlight converters

  1. 1. Working with Converters Silverlight<br />Mahender<br />Senior Software Engineer<br />United Health Group<br />
  2. 2. Mahender Sarangam<br />Having 5 years of experience on .NET Technologies. Working as a Senior Software Engineer in United Health Group(UHG India Information Service Ltd.). Worked with Big Firms like Deloitte Consulting & Wipro Technology. <br />Got Technical Acquaintance on Technologies like C#, ASP.NET,AJAX, LINQ, Silverlight, WPF,WCF ,SQL Server, Team Foundation Server(TFS) and SharePoint Technology. <br />MCTS Certified in Web Technologies.<br />
  3. 3. Converters<br /><ul><li>Silverlight has an excellent data binding engine that allows data to be bound through XAML or programmatically with codeand at time there is necessity of data need to be modified or tweaked.
  4. 4. Most of the today LOB in data binding to format the data displayed in the UI.</li></li></ul><li>Every time We show a date or a price in a format user can understand. Silverlight and WPF are using the so called converters to apply custom logic to a binding<br />Before Applying Converter After Applying converter<br />
  5. 5.
  6. 6. How to Implement<br />Value converters are extremely powerful. They implement IValueConverter, and they have two methods: Convert and ConvertBack.<br />Value converters are valuable in minimizing the code required directly in the UI and in providing reuse of conversion logic<br />They Are 2 types of Converter <br />1) Value Converter<br />2) Type converters<br />They are used throughout the .NET framework to handle translation of one CLR type to another<br />
  7. 7. public class TestClass : Control<br />{<br />[TypeConverter(typeof(BorderTypeConverter))]<br />public Border Border<br />{<br />get { return (Border)GetValue(BorderProperty); }<br />set { SetValue(BorderProperty, value); }<br />}<br />public static readonlyDependencyPropertyBorderProperty =<br />DependencyProperty.Register("Border", typeof(Border),<br />typeof(TestClass), null);<br />}<br />
  8. 8. Demo<br />
  9. 9. Thank you<br />

×