SetImage() public method

Sets the button's image.
public SetImage ( ResourceHandle imageHandle, bool center = false ) : void
imageHandle ResourceHandle
center bool Determines whether the image should be centered.
return void
Exemplo n.º 1
0
        public override Control CreateControl(Control parent)
        {
            var btn = new Button(parent);

            btn.ShouldDrawBackground = false;

            var iBuffer = IconManager.GetIconData(icon, IconSize.Invalid);
            btn.SetImage(iBuffer,true);
            btn.SetSize(20, 20);

            btn.Clicked += c => OnClicked();

            return btn;
        }