Ejemplo n.º 1
0
        public override void CopyFrom(Style s)
        {
            if (s != null)
            {
                base.CopyFrom(s);

                if (s is ListViewPanelStyle)
                {
                    ListViewPanelStyle lvs = (ListViewPanelStyle)s;

                    if (!lvs.IsEmpty)
                    {
                        if (lvs.IsSet(PROP_BACKIMAGEURL))
                        {
                            this.BackImageUrl = lvs.BackImageUrl;
                        }
                        if (lvs.IsSet(PROP_HORIZONTALALIGN))
                        {
                            this.HorizontalAlign = lvs.HorizontalAlign;
                        }
                        if (lvs.IsSet(PROP_WRAP))
                        {
                            this.Wrap = lvs.Wrap;
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
        public override void MergeWith(Style s)
        {
            if (s != null)
            {
                if (IsEmpty)
                {
                    // merge into an empty style is equivalent to a copy,
                    // which is more efficient
                    CopyFrom(s);
                    return;
                }

                base.MergeWith(s);

                if (s is ListViewPanelStyle)
                {
                    ListViewPanelStyle lvs = (ListViewPanelStyle)s;

                    if (!lvs.IsEmpty)
                    {
                        if (lvs.IsSet(PROP_BACKIMAGEURL) && !this.IsSet(PROP_BACKIMAGEURL))
                        {
                            this.BackImageUrl = lvs.BackImageUrl;
                        }
                        if (lvs.IsSet(PROP_HORIZONTALALIGN) && !this.IsSet(PROP_HORIZONTALALIGN))
                        {
                            this.HorizontalAlign = lvs.HorizontalAlign;
                        }
                        if (lvs.IsSet(PROP_WRAP) && !this.IsSet(PROP_WRAP))
                        {
                            this.Wrap = lvs.Wrap;
                        }
                    }
                }
            }
        }