Ejemplo n.º 1
0
        internal static ResDictDoc Load(string path)
        {
            var doc = new ResDictDoc();

            doc.Load_(path);
            return(doc);
        }
Ejemplo n.º 2
0
        public ResDictElement(ResDictDoc resDictDoc, XElement xElement)
        {
            ResDictDoc = resDictDoc;

            _Key = (string)xElement.Attribute(xNsX + "Key");
            _Xml = xElement;
            _Obj = CreateObjectFromXml();
        }
Ejemplo n.º 3
0
 internal static ResDictElement FromXElement(ResDictDoc resDictDoc, XElement xElement)
 {
     if (xElement.Name == ResDictElement.xNs + "DrawingImage")
     {
         return(new DrawingImageResDictElement(resDictDoc, xElement));
     }
     else
     {
         return(new ResDictElement(resDictDoc, xElement));
     }
 }
Ejemplo n.º 4
0
        public IDockDocument OpenFile(string path)
        {
            var doc = ResDictDoc.Load(path);

            return(XDrawCore.Instance.DockManager.ShowDocument(String.Format("ResDictDoc{0}", _NextDocId++),
                                                               (context, id) =>
            {
                return new ResDictDocControl(context, id)
                {
                    Document = doc
                };
            }));
        }
Ejemplo n.º 5
0
 public static DrawingImageResDictElement CreateNew(ResDictDoc resDictDoc, string key)
 {
     return(new DrawingImageResDictElement(resDictDoc, XElement.Parse(
                                               "<DrawingImage x:Key=\"" + key + "\" xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\">" +
                                               "<DrawingImage.Drawing><DrawingGroup></DrawingGroup></DrawingImage.Drawing></DrawingImage>")));
 }
Ejemplo n.º 6
0
 public DrawingImageResDictElement(ResDictDoc resDictDoc, XElement xElement) :
     base(resDictDoc, xElement)
 {
 }