Esempio n. 1
0
 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);
         }
     }
 }
Esempio n. 2
0
 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);
         }
     }
 }
Esempio n. 3
0
        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);
            }
        }
Esempio n. 4
0
 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;
     }
 }
Esempio n. 5
0
        public override void ApplyStyle(ViewStyle viewStyle)
        {
            base.ApplyStyle(viewStyle);

            if (viewStyle is ToastStyle toastStyle)
            {
                textLabel.ApplyStyle(toastStyle.Text);
            }
        }
Esempio n. 6
0
        /// <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);
            }
        }
Esempio n. 7
0
 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);
         }
     }
 }