示例#1
0
        private void InitToolTipStyle()
        {
            // create style for ToolTipItem
            Style style = Style.GetToolTipStyle();

            style.SetBorder(new Border(Color.White, new CornerRadius(0, 5, 0, 5), 1));
            style.Background = Color.FromArgb(180, 180, 180);
            style.Foreground = Color.Black;
            style.Font       = DefaultsService.GetDefaultFont(13);
            style.SetShadow(new Shadow(5, 0, 3, Color.FromArgb(150, 0, 0, 0)));
            style.IsShadowDrop = true;
            Style textStyle = style.GetInnerStyle("text");

            if (textStyle != null)
            {
                textStyle.SetMargin(25, 5, 10, 5);
            }

            // manage tooltip via static ToolTip class
            ToolTip.SetStyle(this, style);
            ToolTip.AddItems(this, ItemsFactory.GetDecor());
        }