public override void ApplyStyle(ViewStyle viewStyle) { base.ApplyStyle(viewStyle); if (viewStyle != null && viewStyle is DefaultLinearItemStyle defaultStyle) { if (itemLabel != null) { itemLabel.ApplyStyle(defaultStyle.Label); } if (itemSubLabel != null) { itemSubLabel.ApplyStyle(defaultStyle.SubLabel); } if (itemIcon != null) { itemIcon.ApplyStyle(defaultStyle.Icon); } if (itemExtra != null) { itemExtra.ApplyStyle(defaultStyle.Extra); } if (itemSeperator != null) { itemSeperator.ApplyStyle(defaultStyle.Seperator); //FIXME : currently padding and margin are not applied by ApplyStyle automatically as missing binding features. itemSeperator.Margin = new Extents(defaultStyle.Seperator.Margin); } } }
public override void ApplyStyle(ViewStyle viewStyle) { base.ApplyStyle(viewStyle); if (viewStyle != null && viewStyle is DefaultLinearItemStyle defaultStyle) { if (itemLabel != null) { itemLabel.ApplyStyle(defaultStyle.Label); } if (itemSubLabel != null) { itemSubLabel.ApplyStyle(defaultStyle.SubLabel); } if (itemIcon != null) { itemIcon.ApplyStyle(defaultStyle.Icon); } if (itemExtra != null) { itemExtra.ApplyStyle(defaultStyle.Extra); } if (itemSeperator != null) { itemSeperator.ApplyStyle(defaultStyle.Seperator); } } }
public override void ApplyStyle(ViewStyle viewStyle) { base.ApplyStyle(viewStyle); ToastStyle toastStyle = viewStyle as ToastStyle; if (null != toastStyle) { if (null == textLabel) { textLabel = new TextLabel() { PositionUsesPivotPoint = true, ParentOrigin = Tizen.NUI.ParentOrigin.Center, PivotPoint = Tizen.NUI.PivotPoint.Center, WidthResizePolicy = ResizePolicyType.UseNaturalSize, HeightResizePolicy = ResizePolicyType.UseNaturalSize, HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center, }; this.Add(textLabel); } textLabel.ApplyStyle(toastStyle.Text); } }
public override void ApplyStyle(ViewStyle viewStyle) { base.ApplyStyle(viewStyle); if (viewStyle != null && viewStyle is DefaultLinearItemStyle defaultStyle) { if (itemLabel != null) { itemLabel.ApplyStyle(defaultStyle.Label); } if (itemSubLabel != null) { itemSubLabel.ApplyStyle(defaultStyle.SubLabel); } if (itemIcon != null) { itemIcon.ApplyStyle(defaultStyle.Icon); } if (itemExtra != null) { itemExtra.ApplyStyle(defaultStyle.Extra); } if (itemSeperator != null) { itemSeperator.ApplyStyle(defaultStyle.Seperator); //FIXME : currently margin is not applied by ApplyStyle automatically. itemSeperator.Margin = defaultStyle.Seperator.Margin; } //FIXME : currently padding is not applied by ApplyStyle automatically. Extents padding = defaultStyle.Padding; Padding = padding; } }
public override void ApplyStyle(ViewStyle viewStyle) { base.ApplyStyle(viewStyle); if (viewStyle is ToastStyle toastStyle) { textLabel.ApplyStyle(toastStyle.Text); } }
/// <summary> /// Apply style to toast. /// </summary> /// <param name="viewStyle">The style to apply.</param> /// <since_tizen> 8 </since_tizen> public override void ApplyStyle(ViewStyle viewStyle) { base.ApplyStyle(viewStyle); ToastStyle toastStyle = viewStyle as ToastStyle; if (null != toastStyle) { if (null == textLabel) { textLabel = new TextLabel(); this.Add(textLabel); } textLabel.ApplyStyle(toastStyle.Text); } }
public override void ApplyStyle(ViewStyle viewStyle) { base.ApplyStyle(viewStyle); if (viewStyle != null && viewStyle is DefaultGridItemStyle defaultStyle) { if (itemLabel != null) { itemLabel.ApplyStyle(defaultStyle.Label); } if (itemImage != null) { itemImage.ApplyStyle(defaultStyle.Image); } if (itemBadge != null) { itemBadge.ApplyStyle(defaultStyle.Badge); } } }