Exemple #1
0
 void Init(Windows.UI.Color color)
 {
     this.minScale               = 0.0;
     this.maxScale               = 1.0;
     this.gradient               = true;
     this.color                  = color;
     this.showBorder             = false;
     this.borderColor            = Colors.Black;
     this.direction              = BarDirection.LeftToRight;
     this.negativeFillColor      = Colors.Red;
     this.useNegativeFillColor   = true;
     this.negativeBorderColor    = Colors.Black;
     this.useNegativeBorderColor = false;
     this.axisPosition           = DataBarAxisPosition.Automatic;
     this.axisColor              = Colors.Black;
     this.showBarOnly            = false;
 }
Exemple #2
0
        /// <summary>
        /// Generates the rule from its XML representation.
        /// </summary>
        /// <param name="reader">The XML reader.</param>
        protected override void OnReadXml(XmlReader reader)
        {
            base.OnReadXml(reader);
            switch (reader.Name)
            {
            case "Type0":
                base.scales[0] = new ScaleValue((ScaleValueType)Serializer.DeserializeObj(typeof(ScaleValueType), reader), base.scales[0].Value);
                return;

            case "Type2":
                base.scales[2] = new ScaleValue((ScaleValueType)Serializer.DeserializeObj(typeof(ScaleValueType), reader), base.scales[2].Value);
                return;

            case "Value0":
                base.scales[0] = new ScaleValue(base.scales[0].Type, Serializer.DeserializeObj(null, reader));
                return;

            case "Value2":
                base.scales[2] = new ScaleValue(base.scales[2].Type, Serializer.DeserializeObj(null, reader));
                return;

            case "MaxScale":
                this.maxScale = (double)((double)Serializer.DeserializeObj(typeof(double), reader));
                return;

            case "MinScale":
                this.minScale = (double)((double)Serializer.DeserializeObj(typeof(double), reader));
                return;

            case "Gradient":
                this.gradient = (bool)((bool)Serializer.DeserializeObj(typeof(bool), reader));
                return;

            case "Color":
                this.color = (Windows.UI.Color)Serializer.DeserializeObj(typeof(Windows.UI.Color), reader);
                return;

            case "ShowBorder":
                this.showBorder = (bool)((bool)Serializer.DeserializeObj(typeof(bool), reader));
                return;

            case "BorderColor":
                this.borderColor = (Windows.UI.Color)Serializer.DeserializeObj(typeof(Windows.UI.Color), reader);
                return;

            case "BarDirection":
                this.direction = (BarDirection)Serializer.DeserializeObj(typeof(BarDirection), reader);
                return;

            case "NegativeFillColor":
                this.negativeFillColor = (Windows.UI.Color)Serializer.DeserializeObj(typeof(Windows.UI.Color), reader);
                return;

            case "UseNegativeFillColor":
                this.useNegativeFillColor = (bool)((bool)Serializer.DeserializeObj(typeof(bool), reader));
                return;

            case "NegativeBorderColor":
                this.negativeBorderColor = (Windows.UI.Color)Serializer.DeserializeObj(typeof(Windows.UI.Color), reader);
                return;

            case "UseNegativeBorderColor":
                this.useNegativeBorderColor = (bool)((bool)Serializer.DeserializeObj(typeof(bool), reader));
                return;

            case "AxisPosition":
                this.axisPosition = (DataBarAxisPosition)Serializer.DeserializeObj(typeof(DataBarAxisPosition), reader);
                return;

            case "AxisColor":
                this.axisColor = (Windows.UI.Color)Serializer.DeserializeObj(typeof(Windows.UI.Color), reader);
                return;

            case "ShowBarOnly":
                this.showBarOnly = (bool)((bool)Serializer.DeserializeObj(typeof(bool), reader));
                return;
            }
        }