![]()  | 
 
XAML Image from code | 
 
    Post Reply  
   | 
  
| Author | |
   
   Steve28  
   
   Newbie  
   Joined: 10 August 2010 Status: Offline Points: 1  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: XAML Image from codePosted: 10 August 2010 at 2:56pm  | 
 
| 
   
    I'm trying to load an image that is contained in a zip archive without unpacking it to a temporary location. I can load the image programmatically, does anyone know if there's a way i can set the Image Source to a bitmap/ole handle at run-time. <Image Width="64" Height="64" Source="file://C:\Research\Images\Png\Explorer.png"/>  really this will be in a zip archive 
    | 
 |
![]()  | 
 |
   
   jpbro  
   
   Senior Member  
   Joined: 12 January 2007 Status: Offline Points: 1357  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 19 August 2010 at 2:14pm | 
 
| 
   
    
   I haven't tried it, but if you are using the MarkupLabel control to display your XAML, take a look at the .Icons.AddBitmap and .Icons.AddIcon methods. They accept a handle parameter, and a Command number for the icon. Then in the source attribute of your XAML, use the Command number of the icon that you added instead of file://... 
   
   | 
 |
| 
   
     
     Product: Xtreme SuitePro (ActiveX) version 16.2.6 
   
  Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6  | 
 |
![]()  | 
 |
   
   markr  
   
   Senior Member  
   Joined: 01 August 2004 Status: Offline Points: 443  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 20 August 2010 at 10:25am | 
 
| 
   
    
   See the markup sample project. It uses XTPImageManager() to load images and assign them an ID. You can then reference that ID in your markup. 
    
   
   | 
 |
![]()  | 
 |
    Post Reply  
   | 
  |
|       
  
  Tweet   	
    | 
 
| Forum Jump | Forum Permissions  ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum  |