Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
445
Reducing the height of fields in the xamDataCards
posted

We're using datacards in an app where space is a premium, and we wish to be able to show as many cards with as much data as we can.

Our data is read-only, with no cell-selection required, so I'd like to eliminate most of the default grid styling, with whatever pixels are reserved for cell borders, padding, etc.

I've successfully been able to tweak the LabelPresenter, CellValuePresenter and XamTextEditor styles/templates to compact the cards.

The issue with this, is that the Filter card is the same height and consequently its fields are compacted. From the picture, you'll see that the dropdown still has the standard padding both around and within the combobox, and thus the value gets squeezed. I'd like to be able to adjust the template there, to remove its border, padding, etc., to get to as small a size as is workable, that will keep the other data cards compact.

Question: is it possible to re-work the style/template of the combobox in a filter cell?

I've tried working with the FilterCellValuePresenter, the XamComboEditor, and the default ComboBox styling, and none seems to give me access to what I need to modify.

Parents
  • 28407
    posted

    HI,

     I was able to get the control in the RecordFilterDropDownOpening Event.

     Here is my code snippet

     

     

     

    private void xamDataCards1_RecordFilterDropDownOpening(object sender, Infragistics.Windows.DataPresenter.Events.RecordFilterDropDownOpeningEventArgs e)

    {

     

     

    XamComboEditor xce1 = (XamComboEditor)Infragistics.Windows.Utilities.GetDescendantFromType(xamDataCards1, typeof(XamComboEditor), false);

    xce1.Width = 20;

     

     

     

    SolidColorBrush scb = new SolidColorBrush(Colors.Red);

    xce1.Background = scb;

     

     

    }

     Sincerely,
     Matt
     Developer Support Engineer

     

Reply Children