Approved
Last Updated: 30 Mar 2016 13:59 by ADMIN
ADMIN
George
Created on: 25 Apr 2014 06:36
Category: UI Framework
Type: Bug Report
1
FIX. TPF - ImagePrimitive - setting ImageLayout has no effect
To reproduce:

Set an image to the ImagePrimitive of the RadButtonElement of RadButton. Also set the ImageLayout property to Stretch, Zoom or anything else. You will see that this property has no effect.

Workaround:

Use LightVisualElement. This is how it can be used as control:

[ToolboxItem(true)]
public class RadLightVisualButton : RadControl
{
    private RadLightVisualButtonElement buttonElement;


    public RadLightVisualButtonElement ButtonElement
    {
        get
        {
            return buttonElement;
        }
    }


    protected override void CreateChildItems(RadElement parent)
    {
        base.CreateChildItems(parent);


        this.buttonElement = new RadLightVisualButtonElement();
        parent.Children.Add(this.buttonElement);
    }
}


public class RadLightVisualButtonElement : LightVisualElement
{
    protected override Type ThemeEffectiveType
    {
        get
        {
            return typeof(LightVisualElement);
        }
    }
}

0 comments