Пример #1
0
        private void ToggleButton_Unchecked(object sender, RoutedEventArgs e)
        {
            var controls = MainControl.Children <Control>(c => HelpClient.GetHelpInfo(c) != null, WhereFlags);

            foreach (var item in controls)
            {
                HelpClient.SetHelpInfo(item, null);
            }
        }
Пример #2
0
        void HelpAdorner_MouseDown(object sender, MouseButtonEventArgs e)
        {
            var hi = HelpClient.GetHelpInfo(this.AdornedElement);

            if (hi != null && hi.Link != null)
            {
                Process.Start(hi.Link);
            }
        }
Пример #3
0
        protected override void OnRender(DrawingContext drawingContext)
        {
            var hi = HelpClient.GetHelpInfo(this.AdornedElement);

            var color = hi.Description.HasText() ? Colors.DarkOrange : Colors.Purple;

            // Some arbitrary drawing implements.
            SolidColorBrush renderBrush = new SolidColorBrush(color.Alpha(this.IsMouseOver ? 0.6f : 0.3f));
            Pen             renderPen   = new Pen(new SolidColorBrush(color.Alpha(this.IsMouseOver ? 1f : 0.5f)), 1);

            // Draw a circle at each corner.
            drawingContext.DrawRectangle(renderBrush, renderPen, new Rect(new Point(), this.AdornedElement.RenderSize));
        }