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
2090
XamComboEditor: Prevent horizontal growth when there are many items selected
posted

Hello, is there a way to prevent that a XamComboEditor extents his horizontal width when the text of the MultiSelectedValues is growing? The control sits inside a Grid that might changed by user: The width of the control should follow the with of the Grid Column. I am using the shared version of the XamComboEditor. btw: It would be great if the WPF version can offer the same functions and properties like the shared one.

Thanks

Niko

Parents
  • 6365
    Offline posted

    Hello Niko,

    Thank you for the description of the issue you have provided.

    Presuming you are using a TemplateColumn for displaying the shared XamComboEditor in the XamGrid (by default, the XamGrid uses the MS ComboBox), in order to stretch the editor so it occupies the entire width of the column, I can suggest you set the HorizontalContentAlignment property of the column to Stretch.

    XAML:

    <ig:TemplateColumn Key="Sizes" HorizontalContentAlignment="Stretch">
        <ig:TemplateColumn.ItemTemplate>
            ...
        </ig:TemplateColumn.ItemTemplate>

        <ig:TemplateColumn.EditorTemplate>
            ...
        </ig:TemplateColumn.EditorTemplate>
    </ig:TemplateColumn>

    I have attached a sample application that demonstrates the approach from above.

    If you have any questions, please let me know.

    XamGrid_sample.zip
Reply Children