private void OnAllowProperty(object sender, AllowPropertyEventArgs e) { if (!e.Allow) { return; } if (e.IsSerializing) { if (e.Property != null) { switch (e.Property.Name) { case "BarItemDisplayMode": case "UserGlyphAlignment": e.Allow = _isglobalproperty; break; //case "Items": // e.Allow = false; // break; //case "Bars": // e.Allow = !_isglobalproperty; // break; } } } }
void column_AllowProperty(object sender, AllowPropertyEventArgs e) { e.Allow = e.DependencyProperty == GridColumn.VisibleProperty || e.DependencyProperty == GridColumn.ActualWidthProperty; }