示例#1
0
        /// <summary>
        /// Path factory for recycler.
        /// </summary>
        /// <param name="isp">Not used.</param>
        /// <returns></returns>
        Path CreatePath(ItemState <Path> isp)
        {
            var path = default(Path);

            if (PathTemplate != null)
            {
                path = PathTemplate.LoadContent() as Path;
            }
            else if (Theme?.PathTemplate != null)
            {
                path = Theme.PathTemplate.LoadContent() as Path;
            }
            return(path);
        }
        /// <summary>
        /// Path factory for recycler.
        /// </summary>
        /// <param name="isp">Not used.</param>
        /// <returns></returns>
        Path CreatePath(ItemState <Path> isp)
        {
            var path = default(Path);

            if (PathTemplate != null)
            {
                path = PathTemplate.LoadContent() as Path;
            }
            else if (Theme?.PathTemplate != null)
            {
                path = Theme.PathTemplate.LoadContent() as Path;
            }
            if (path != null)
            {
                path.Style = Generator.NextStyle();
            }
            return(path);
        }
        /// <summary>
        /// Path factory for recycler.
        /// </summary>
        /// <param name="isp">Not used.</param>
        /// <returns></returns>
        Path CreatePath(ItemState <Path> isp)
        {
            var path = default(Path);

            if (PathTemplate != null)
            {
                path = PathTemplate.LoadContent() as Path;
            }
            else if (Theme?.PathTemplate != null)
            {
                path = Theme.PathTemplate.LoadContent() as Path;
                if (PathStyle != null)
                {
                    BindTo(this, nameof(PathStyle), path, FrameworkElement.StyleProperty);
                }
            }
            return(path);
        }