ScreenToGif/Controls/PathListViewItem.cs

(开头部分) 6KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using ScreenToGif.Util;

namespace ScreenToGif.Controls
{
    public class PathListViewItem : ListViewItem
    {
        #region Dependency Properties

        public static readonly DependencyProperty FullPathProperty = DependencyProperty.Register("FullPath", typeof(string), typeof(PathListViewItem),
            new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender, Path_PropertyChanged));

        public static readonly DependencyProperty HasFoldersProperty = DependencyProperty.Register("HasFolders", typeof(bool), typeof(PathListViewItem),
            new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsMeasure));

        public static readonly DependencyProperty HasFilesProperty = DependencyProperty.Register("HasFiles", typeof(bool), typeof(PathListViewItem),
            new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsMeasure));

        public static readonly DependencyProperty CategoryProperty = DependencyProperty.Register("Category", typeof(PathType), typeof(PathListViewItem),
            new FrameworkPropertyMetadata(PathType.Folder));

        public static readonly DependencyProperty IsInaccessibleProperty = DependencyProperty.Register("IsInaccessible", typeof(bool), typeof(PathListViewItem),
            new FrameworkPropertyMetadata(false));

        public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(PathListViewItem),
            new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsMeasure));

        public static readonly DependencyProperty ImageProperty = DependencyProperty.Register("Image", typeof(UIElement), typeof(PathListViewItem),
            new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));

        public static readonly DependencyProperty MaxSizeProperty = DependencyProperty.Register("MaxSize", typeof(double), typeof(PathListViewItem),
            new FrameworkPropertyMetadata(18.0));

        #endregion

        #region Properties

        /// <summary>
        /// The full path.
        /// </summary>
        [Description("The full path."), Bindable(true), Category("Common")]
        public string FullPath
        {
            get { return (string)GetValue(FullPathProperty); }
            set { SetCurrentValue(FullPathProperty, value); }
        }

        /// <summary>
        /// True if it has folders inside.
        /// </summary>
        [Description("True if it has folders inside."), Bindable(true), Category("Common")]
        public bool HasFolders
        {
            get { return (bool)GetValue(HasFoldersProperty); }
后面还有 106 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。