How can I make dynamic loading of images? (1 Viewer)

F13Mim

Portal Member
March 3, 2012
7
0
Home Country
Russian Federation Russian Federation
How can I make dynamic loading of images?

-- xaml
<Image Source="{Binding Path=Img}"/>

-- CS
protected readonly AbstractProperty _imgProperty = new WProperty(typeof(object), null);

public AbstractProperty ImgProperty
{
get { return _imgProperty; }
}

public object Img
{
get { return (object)_imgProperty .GetValue(); }
set { _imgProperty.SetValue(value); }
}

Give an example from the gallery of pictures.
 

F13Mim

Portal Member
March 3, 2012
7
0
Home Country
Russian Federation Russian Federation
I get a lot of images over the Internet.
I do not understand how to realize code?
 

F13Mim

Portal Member
March 3, 2012
7
0
Home Country
Russian Federation Russian Federation
I get different images with different sizes, and I display in <Image/>.
How can this be done?
 

F13Mim

Portal Member
March 3, 2012
7
0
Home Country
Russian Federation Russian Federation
I'm more interested in how to works MediaPortal.UI.SkinEngine.ContentManagement.ContentManager
the class. And why ContentManager.Instance.GetTexture (img.GetBuffer (), "temp.png");
when adding images to ContentManager then does not work
AvatarImage = "temp.png"; display the new image.
 

morpheus_xx

Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    If I understand you correctly, you want to show images from web inside MP2 gui?

    Than it should be enough to assign either a local filename as <Image Source="c:\file.png"> or a web URL <Image Source="http://..de/file.png">. In principle you should not deal with the "low level" ContentManager directly, but use the MPF controls.
     

    Users who are viewing this thread

    Top Bottom