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
Hello,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
i fix it by setting the Stretch-Property of the Visualbrush generating by the converter to Stretch.None. Thanks for your support.
Best regards
Thank you for your post. I have been looking into it and I suggest you set the Rectangle’s HorizontalAlignment and VerticalAlingnment to Center. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.