コード例 #1
0
ファイル: MapShapeModel.cs プロジェクト: zyhong/UI-For-UWP
        private void OnAttributeChanged(AttributeChangedEventArgs args)
        {
            AttributeChangedEventHandler handler = this.AttributeChanged;

            if (handler != null)
            {
                handler(this, args);
            }
        }
コード例 #2
0
ファイル: MapShapeModel.cs プロジェクト: zyhong/UI-For-UWP
        void IMapShape.SetAttribute(string key, object value)
        {
            if (this.attributes == null || string.IsNullOrEmpty(key))
            {
                return;
            }

            var oldValue = (this as IMapShape).GetAttribute(key);

            if (oldValue != value)
            {
                this.attributes[key] = value;
                AttributeChangedEventArgs args = new AttributeChangedEventArgs(key, oldValue, value);
                this.OnAttributeChanged(args);
            }
        }