this.radButton1.ButtonElement.ImagePrimitive.SvgImage = RadSvgImage.FromFile(@"..\..\image.svg");
this.radButton1.TextImageRelation = TextImageRelation.TextBeforeImage;
this.radButton1.ButtonElement.ImagePrimitive.ImageLayout = ImageLayout.Zoom;
this.radButton1.ButtonElement.ImagePrimitive.StretchVertically = true;
this.radButton1.ButtonElement.ImagePrimitive.StretchHorizontally = true;
Hi, John,
I confirm that it is an issue with the ImagePrimitive that is internally used in RadButton.
Currently, the possible solution that I can suggest is to use a LightVisualElement instead. Please refer to the following code snippet which result is illustrated in the gif file:
LightVisualElement lveSVG = new LightVisualElement();
lveSVG.Text = "Click";
lveSVG.DrawText = true;
lveSVG.TextImageRelation = TextImageRelation.TextBeforeImage;
this.radButton1.Text = "";
lveSVG.ImageLayout = ImageLayout.Zoom;
lveSVG.SvgImage = RadSvgImage.FromFile(@"..\..\image.svg");
this.radButton1.ButtonElement.Children.Add(lveSVG);
I believe that it would fit your requirements.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik