void OnCustomizationLayoutsEditValueChanged(object sender, EditValueChangedEventArgs e) { FieldListAllowedLayouts layout = (FieldListAllowedLayouts)customizationLayouts.SelectedItems[0]; foreach (FieldListAllowedLayouts layout2 in customizationLayouts.SelectedItems) { layout = layout | layout2; } pivotGrid.FieldListAllowedLayouts = layout; EnsureCurrentLayoutItems(true); }
FieldListLayout ToFieldListAllowedLayouts(FieldListAllowedLayouts layout) { switch (layout) { case FieldListAllowedLayouts.BottomPanelOnly1by4: return(FieldListLayout.BottomPanelOnly1by4); case FieldListAllowedLayouts.BottomPanelOnly2by2: return(FieldListLayout.BottomPanelOnly2by2); case FieldListAllowedLayouts.StackedDefault: return(FieldListLayout.StackedDefault); case FieldListAllowedLayouts.StackedSideBySide: return(FieldListLayout.StackedSideBySide); case FieldListAllowedLayouts.TopPanelOnly: return(FieldListLayout.TopPanelOnly); default: return(FieldListLayout.StackedDefault); } }