Skip to content

Commit 88e5e5c

Browse files
committed
Add some comments
1 parent 16f5e6b commit 88e5e5c

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

MaterialDesignThemes.Wpf/Converters/HintProxyFabricConverter.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111

1212
namespace MaterialDesignThemes.Wpf.Converters
1313
{
14+
/// <summary>
15+
/// Converter for <see cref="SmartHint"/> control. Can be extended by <see cref="HintProxyFabric.RegisterBuilder(Func{Control, bool}, Func{Control, IHintProxy})"/> method.
16+
/// </summary>
1417
public class HintProxyFabricConverter : IValueConverter
1518
{
1619
private static readonly Lazy<HintProxyFabricConverter> _instance = new Lazy<HintProxyFabricConverter>();

MaterialDesignThemes.Wpf/SmartHint.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,16 @@
55
using System.Threading.Tasks;
66
using System.Windows;
77
using System.Windows.Controls;
8+
using MaterialDesignThemes.Wpf.Converters;
89

910
namespace MaterialDesignThemes.Wpf
1011
{
12+
13+
/// <summary>
14+
/// A control that implement placeholder behavior. Can work as a simple placeholder either as a floating hint, see <see cref="UseFloating"/> property.
15+
/// <para/>
16+
/// To set a target control you should set the HintProxy property. Use the <see cref="HintProxyFabricConverter.Instance"/> converter which converts a control into the IHintProxy interface.
17+
/// </summary>
1118
[TemplateVisualState(GroupName = MaterialDesignTextStatesGroupName, Name = MaterialDesignStateTextEmptyName)]
1219
[TemplateVisualState(GroupName = MaterialDesignTextStatesGroupName, Name = MaterialDesignStateTextNotEmptyName)]
1320
public class SmartHint : Control
@@ -114,6 +121,7 @@ private static void HintProxyPropertyChangedCallback(DependencyObject dependency
114121
hintProxy.IsVisibleChanged += smartHint.OnHintProxyIsVisibleChanged;
115122
hintProxy.TextChanged += smartHint.OnHintProxyTextChanged;
116123
hintProxy.Loaded += smartHint.OnHintProxyTextChanged;
124+
smartHint.RefreshState(false);
117125
}
118126
}
119127

0 commit comments

Comments
 (0)