Skip to content

Commit 2449ecd

Browse files
committed
Clean code and added documentation for public members
1 parent d25d39c commit 2449ecd

2 files changed

Lines changed: 32 additions & 15 deletions

File tree

source/SuggestBoxLib/PathTrimmingTextBlock.cs

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,23 @@ namespace SuggestBoxLib
1111
public enum EllipsisPlacement
1212
{
1313
/// <summary>
14-
/// Do not show an ellipsis in PathTrimming TexBlock
14+
/// Do not show an ellipsis in the Text of the PathTrimming TexBlock
1515
/// </summary>
1616
None,
1717

1818
/// <summary>
19-
/// Show an ellipsis in the center of PathTrimming TexBlock
19+
/// Show an ellipsis in the center of the Text in the PathTrimming TexBlock
2020
/// </summary>
2121
Center,
2222

23+
/// <summary>
24+
/// Show an ellipsis in the left side of the Text in the PathTrimming TexBlock
25+
/// </summary>
2326
Left,
2427

28+
/// <summary>
29+
/// Show an ellipsis in the right side of the Text in the PathTrimming TexBlock
30+
/// </summary>
2531
Right
2632
}
2733

@@ -46,13 +52,9 @@ public class PathTrimmingTextBlock : TextBlock
4652
typeof(PathTrimmingTextBlock),
4753
new UIPropertyMetadata(string.Empty));
4854

49-
50-
public EllipsisPlacement ShowElipses
51-
{
52-
get { return (EllipsisPlacement)GetValue(ShowElipsesProperty); }
53-
set { SetValue(ShowElipsesProperty, value); }
54-
}
55-
55+
/// <summary>
56+
/// Implements the backing store of the <see cref="ShowElipses"/> dependency property.
57+
/// </summary>
5658
public static readonly DependencyProperty ShowElipsesProperty =
5759
DependencyProperty.Register("ShowElipses", typeof(EllipsisPlacement),
5860
typeof(PathTrimmingTextBlock), new PropertyMetadata(EllipsisPlacement.None));
@@ -83,6 +85,15 @@ public string Path
8385
get { return (string)this.GetValue(PathProperty); }
8486
set { this.SetValue(PathProperty, value); }
8587
}
88+
89+
/// <summary>
90+
/// Gets/sets whether the Path string should be shortend and displayed with an elipses or not.
91+
/// </summary>
92+
public EllipsisPlacement ShowElipses
93+
{
94+
get { return (EllipsisPlacement)GetValue(ShowElipsesProperty); }
95+
set { SetValue(ShowElipsesProperty, value); }
96+
}
8697
#endregion properties
8798

8899
#region methods

source/SuggestBoxLib/SuggestBoxBase.xaml.cs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,9 @@ public class SuggestBoxBase : TextBox
150150
DependencyProperty.Register("ValidText", typeof(bool),
151151
typeof(SuggestBoxBase), new PropertyMetadata(true, OnValidTextChanged));
152152

153-
public EllipsisPlacement ShowElipses
154-
{
155-
get { return (EllipsisPlacement)GetValue(ShowElipsesProperty); }
156-
set { SetValue(ShowElipsesProperty, value); }
157-
}
158-
153+
/// <summary>
154+
/// Implements the backing store of the <see cref="ShowElipses"/> dependency property.
155+
/// </summary>
159156
public static readonly DependencyProperty ShowElipsesProperty =
160157
DependencyProperty.Register("ShowElipses", typeof(EllipsisPlacement),
161158
typeof(SuggestBoxBase), new PropertyMetadata(EllipsisPlacement.None));
@@ -347,6 +344,15 @@ protected bool ParentWindowIsClosing
347344
return _ParentWindowIsClosing;
348345
}
349346
}
347+
348+
/// <summary>
349+
/// Gets/sets whether the Path string should be shortend and displayed with an elipses or not.
350+
/// </summary>
351+
public EllipsisPlacement ShowElipses
352+
{
353+
get { return (EllipsisPlacement)GetValue(ShowElipsesProperty); }
354+
set { SetValue(ShowElipsesProperty, value); }
355+
}
350356
#endregion
351357

352358
#region Methods

0 commit comments

Comments
 (0)