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; }
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; }
private void Initialize() { tabAttributes = attributes as TabAttributes; if (tabAttributes == null) { throw new Exception("Tab attribute parse error."); } ApplyAttributes(this, tabAttributes); LayoutDirectionChanged += OnLayoutDirectionChanged; }
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(); } }
public Tab(TabAttributes attributes) : base(attributes) { Initialize(); }