Пример #1
0
            public override IEnumerable <String> RenderPaths(IEnumerable <Path2D> path, StyleBrush fill,
                                                             StyleBrush highlightFill,
                                                             StyleBrush selectFill, StylePen outline,
                                                             StylePen highlightOutline,
                                                             StylePen selectOutline, RenderState renderState)
            {
                if (path == null)
                {
                    throw new ArgumentNullException("path");
                }

                yield return(path.ToString() +
                             fill == null
                                 ? String.Empty
                                 : fill.ToString() +
                             selectFill == null
                                       ? String.Empty
                                       : selectFill.ToString() +
                             highlightFill == null
                                             ? String.Empty
                                             : highlightFill.ToString() +
                             outline == null
                                                   ? String.Empty
                                                   : outline.ToString() +
                             highlightOutline == null
                                                         ? String.Empty
                                                         : highlightOutline.ToString() +
                             selectOutline == null
                                                               ? String.Empty
                                                               : selectOutline.ToString());
            }
Пример #2
0
 /// <summary>Найти кисть в ресурсах</summary>
 /// <param name="Name">Имя кисти</param>
 public static SolidColorBrush GetBrushFromResource(StyleBrush Name)
 {
     return(Application.Current.Resources[Name.ToString()] as SolidColorBrush);
 }