The binding for visibility for the following is not working:
<igDP:Field Name="Owner" FixedLocation="FixedToNearEdge" Label="Owner" Width="90" Visibility="{Binding IsChecked,ElementName=ExtendedDisplayToggleButton,Converter={StaticResource booleanToVisibilityConverter}}"> </igDP:Field>
Hello,
I'm attaching a sample project which reproduces the desired behaviour.
If it doesn't meet your requirements, please feel free to ask.
Regards,
Anastas
That will work with one field, but is there not a way to do it the other way. That way I can control multiple fields with one toggle button.
ThanksCLifford
Thanks, just had to do it with background code:
private void ExtendedDisplayToggleButton_Checked(object sender, RoutedEventArgs e) { ShowHideFields(Visibility.Visible); } private void ExtendedDisplayToggleButton_Unchecked(object sender, RoutedEventArgs e) { ShowHideFields(Visibility.Collapsed); } private void ShowHideFields(Visibility showHide) { var fields = xdgMain.FieldLayouts[0].Fields; foreach (var field in fields) { switch (field.Name) { case "Owner": case "TradeDate": case "SettleDate": case "MinSettleDays": case "Comment": case "TotalMarketValue": case "PercentMarketValue": case "PortfolioManager": case "Freeze": case "MinSettleRule": case "T0CashProjection": case "T1CashProjection": case "T2CashProjection": case "T3CashProjection": case "T4CashProjection": case "T5CashProjection": field.Visibility = showHide; break; } } }