Example #1
0
 private void OnStaticViewStyleChanged(object sender, ViewStyle_EventArgs e)
 {
     if (m_UseStaticViewStyle)
     {
         m_ViewStyle.CopyFrom(ViewStyle.staticViewStyle);
     }
 }
Example #2
0
        public TabStyle(TabStyle style) : base(style)
        {
            UnderLine = new ViewStyle();
            Text      = new TextLabelStyle();

            if (null == style)
            {
                return;
            }

            if (style.UnderLine != null)
            {
                UnderLine?.CopyFrom(style.UnderLine);
            }

            if (style.Text != null)
            {
                Text?.CopyFrom(style.Text);
            }

            if (style.ItemPadding != null)
            {
                ItemPadding = new Extents(style.ItemPadding.Start, style.ItemPadding.End, style.ItemPadding.Top, style.ItemPadding.Bottom);
            }
            else
            {
                ItemPadding = new Extents(0, 0, 0, 0);
            }
            ItemSpace          = style.ItemSpace;
            UseTextNaturalSize = style.UseTextNaturalSize;
        }
Example #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnViewStyleChanged(object sender, ViewStyle_EventArgs e)
        {
            if (m_UseStaticViewStyle)
            {
                m_ViewStyle.CopyFrom(ViewStyle.staticViewStyle);
            }

            this.Invalidate(false);
        }