Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

Dynamically change the CommandBarButton.Picture. (Vs2010 isolated shell))

$
0
0

Hi,  

    I want to change image of CommandBarButton dynamically, the code is as following:

  CommandBarButton rmdCommandBarButton = GetRmdCommandButton();
            var picture = GetPicOfRmdCommandButton();
            if (rmdCommandBarButton != null && picture != null && rmdCommandBarButton.Picture != picture)
                rmdCommandBarButton.Picture = (StdPicture) picture;

When i call  the   "rmdCommandBarButton.Picture = (StdPicture) picture",The button icon in the toolbar work well, but  in the menu  item of Add or Remove Button,  the icon cannot display 

Why? 

 

Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>