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

F13Mim

Portal Member
March 3, 2012
7
0
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
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
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
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

Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,400
    6,972
    Germany Germany
    Country flag
    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 (Users: 0, Guests: 1)

    Top Bottom