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
700
Don´t stretch content in cells
posted

Hi,

is there a property to prevent that a a custom CellValuePresenter which is defined in a style, is automatically stretched to the cell ?

The Control Template of the CellValuePresenter is a rect  (icon) which Fill property is generate by a converter. After that, the rect is streched to the whole cell. I cant set the Witdh an Height properties because the converter can return more than one icon.

 <Style x:Key="DocumentStatusStyle" TargetType="{x:Type igDP:CellValuePresenter}">
            <Setter Property="Control.Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}">
                        <Rectangle Fill="{Binding Path=DataItem.DocumentState, Converter={x: con:DocumentIconsStatusConverter}}" />        
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

Thanks and best regards