packages/MaterialDesignThemes.2.5.1/src/net45/TreeViewAssist.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.IO;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Markup;
namespace MaterialDesignThemes.Wpf
{
public static class TreeViewAssist
{
/// <summary>
/// Allows additional rendering for each tree node, outside of the rippled part of the node which responsds to user selection.
/// </summary>
/// <remarks>
/// The content to be rendered is the same of the <see cref="TreeViewItem"/>; i.e the Header property, or
/// some other content such as a view model, typically when using a <see cref="HierarchicalDataTemplate"/>.
/// </remarks>
public static readonly DependencyProperty AdditionalTemplateProperty = DependencyProperty.RegisterAttached(
"AdditionalTemplate",
typeof(DataTemplate),
typeof(TreeViewAssist),
new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.Inherits));
/// <summary>
/// Sets the additional template.
/// </summary>
/// <param name="element">The element.</param>
/// <param name="value">The value.</param>
public static void SetAdditionalTemplate(DependencyObject element, DataTemplate value)
{
element.SetValue(AdditionalTemplateProperty, value);
}
/// <summary>
/// Gets the additional template.
/// </summary>
/// <param name="element">The element.</param>
/// <returns>
/// The <see cref="DataTemplate" />.
/// </returns>
public static DataTemplate GetAdditionalTemplate(DependencyObject element)
{
return (DataTemplate)element.GetValue(AdditionalTemplateProperty);
}
/// <summary>
/// Allows additional rendering for each tree node, outside of the rippled part of the node which responsds to user selection.
/// </summary>
/// <remarks>
/// The content to be rendered is the same of the <see cref="TreeViewItem"/>; i.e the Header property, or
/// some other content such as a view model, typically when using a <see cref="HierarchicalDataTemplate"/>.
/// </remarks>
public static readonly DependencyProperty AdditionalTemplateSelectorProperty = DependencyProperty.RegisterAttached(
"AdditionalTemplateSelector",
typeof(DataTemplateSelector),
typeof(TreeViewAssist),
new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.Inherits));
/// <summary>
后面还有 43 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。