public static class GridPropertyBinder { #region Visibility public static readonly DependencyProperty VisibilityBindingProperty = DependencyProperty.RegisterAttached( "VisibilityBinding", typeof(object), typeof(GridPropertyBinder), new PropertyMetadata(null, GridPropertyBinder.VisibilityBinding_PropertyChanged)); public static object GetVisibilityBinding(DependencyObject source) { return (object)source.GetValue(GridPropertyBinder.VisibilityBindingProperty); } public static void SetVisibilityBinding(DependencyObject target, object value) { target.SetValue(GridPropertyBinder.VisibilityBindingProperty, value); } private static void VisibilityBinding_PropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { DataGridColumn column = d as DataGridColumn; if (column == null) { return; } if ((bool)e.NewValue) { column.Visibility = Visibility.Visible; } else { column.Visibility = Visibility.Collapsed; } } #endregion }
This Blog is a programing portal, with tutorials and references relating to development subjects, including C#,Silverlight,WCF, Asp.Net,HTML, XML, CSS, JavaScript,Sql, Windows Administration.
Tuesday, April 3, 2012
How to create own Grid property binder class in silver light
Subscribe to:
Post Comments (Atom)
titanium rod in femur complications - titanium-arts.com
ReplyDeleteTitanium rods make shaving the titanium flat irons easiest titanium dive knife and easiest transition possible. T-betting, D-iron, ti 89 titanium calculator or camillus titanium knife the lighter, the best option for you titanium scissors is