This is a further question about this topic: How to use deserialized object? I have a Problem with some variables in my class, right now I just put [XmlIgnore]
infront of the variables wich cannot be serialized, so the serialazation of the class works for now.
My class looks like this:
public class Channel : INotifyPropertyChanged
{
public int Width { get; set; }
public int Height { get; set; }
[XmlIgnore]
public BitmapImage Logo { get; set; }
public string CurrentCoverURL { get; set; }
[XmlIgnore]
public SolidColorBrush Background { get; set; }
private string name;
public string Name
{
get { return name; }
set
{
name = value;
NotifyPropertyChanged("Name");
}
}
}
Now I somehow need to serialize the Bitmapimage and the SolidColorBrush too, so I can pass these informations to my next view.
I found a way to do this(Serialize a Bitmap in C#/.NET to XML), but this doesn't work for Windows 8 Apps. System.Drawing.Bitmap
is not available in Windows 8.
Can someone help me with this issue?
Thanks!