I saw that, but it work on the basis of colspan & rowspan. I need to deal with image's height & width. I tried this code it's not working.
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
{
BindingOperations.SetBinding(element, WidthProperty, new Binding { Path = new PropertyPath("imgWidth") });
BindingOperations.SetBinding(element, HeightProperty, new Binding { Path = new PropertyPath("imgHeight") });
base.PrepareContainerForItemOverride(element, item);
}
No comments:
Post a Comment