Ejemplo n.º 1
0
        public TabAttributes(TabAttributes attributes) : base(attributes)
        {
            if (null == attributes)
            {
                return;
            }

            if (attributes.UnderLineAttributes != null)
            {
                UnderLineAttributes = attributes.UnderLineAttributes.Clone() as ViewAttributes;
            }

            if (attributes.TextAttributes != null)
            {
                TextAttributes = attributes.TextAttributes.Clone() as TextAttributes;
            }

            if (attributes.Space != null)
            {
                Space = new Vector4(attributes.Space.X, attributes.Space.Y, attributes.Space.Z, attributes.Space.W);
            }
            else
            {
                Space = new Vector4(0, 0, 0, 0);
            }
            ItemSpace          = attributes.ItemSpace;
            UseTextNaturalSize = attributes.UseTextNaturalSize;
        }
Ejemplo n.º 2
0
        public TabAttributes(TabAttributes attributes) : base(attributes)
        {
            if (null == attributes)
            {
                return;
            }

            if (attributes.UnderLineAttributes != null)
            {
                UnderLineAttributes = attributes.UnderLineAttributes.Clone() as ViewAttributes;
            }

            if (attributes.TextAttributes != null)
            {
                TextAttributes = attributes.TextAttributes.Clone() as TextAttributes;
            }

            if (attributes.Space != null)
            {
                Space = new Vector4(attributes.Space.X, attributes.Space.Y, attributes.Space.Z, attributes.Space.W);
            }
            else
            {
                Space = new Vector4(0, 0, 0, 0);
            }
            ItemGap           = attributes.ItemGap;
            IsNatureTextWidth = attributes.IsNatureTextWidth;
        }
Ejemplo n.º 3
0
        private void Initialize()
        {
            tabAttributes = attributes as TabAttributes;
            if (tabAttributes == null)
            {
                throw new Exception("Tab attribute parse error.");
            }

            ApplyAttributes(this, tabAttributes);
            LayoutDirectionChanged += OnLayoutDirectionChanged;
        }
Ejemplo n.º 4
0
        protected override void OnThemeChangedEvent(object sender, StyleManager.ThemeChangeEventArgs e)
        {
            TabAttributes tempAttributes = StyleManager.Instance.GetAttributes(style) as TabAttributes;

            if (tempAttributes != null)
            {
                tempAttributes.UseTextNaturalSize = tabAttributes.UseTextNaturalSize; // keep IsNatureTextWidth as original
                attributes = tabAttributes = tempAttributes;
                RelayoutRequest();
            }
        }
Ejemplo n.º 5
0
 public Tab(TabAttributes attributes) : base(attributes)
 {
     Initialize();
 }