This is a migrated thread and some comments may be shown as answers.

CommandBarButton Image, stretches

3 Answers 127 Views
CommandBar
This is a migrated thread and some comments may be shown as answers.
Troy
Top achievements
Rank 3
Bronze
Iron
Iron
Troy asked on 20 Sep 2020, 05:08 PM

When I set a command bar button image at design time, it looks correct.  Its the 16x16 image I am using.  However, when I set it programmatically, it appears to be 32x32.  I'm setting it from an imageList.  I made sure that the image list is 16x16 as well.

 

 

3 Answers, 1 is accepted

Sort by
0
Troy
Top achievements
Rank 3
Bronze
Iron
Iron
answered on 20 Sep 2020, 05:21 PM

One other thing.  If I put a breakpoint in before I set the image from the image list and check the image size, I get:

 

{Width = 16 Height = 16}
    Height: 16
    IsEmpty: False
    Width: 16

 

And then as soon as I set the image from the image list, I check again and I get:

 

{Width = 32 Height = 32}
    Height: 32
    IsEmpty: False
    Width: 32

0
Troy
Top achievements
Rank 3
Bronze
Iron
Iron
answered on 20 Sep 2020, 05:23 PM
Ok, well... nevermind.  Apparently I was up too late last night and while I SWEAR my imageList was 16x16... I checked now and its 32x32... no idea why.  Completely my fault.  Ignore this, sorry to waste any of your time.
0
Nadya | Tech Support Engineer
Telerik team
answered on 21 Sep 2020, 10:21 AM

Hi, Troy,

I am glad that you managed to found out what is causing the problem on your end. In case of any further difficulties do not hesitate to contact us.

Regards,
Nadya
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
CommandBar
Asked by
Troy
Top achievements
Rank 3
Bronze
Iron
Iron
Answers by
Troy
Top achievements
Rank 3
Bronze
Iron
Iron
Nadya | Tech Support Engineer
Telerik team
Share this question
or