Skip to content

Commit cc74da3

Browse files
committed
refactor: format code
1 parent 2fef2d2 commit cc74da3

12 files changed

+449
-434
lines changed

src/GongSolutions.WPF.DragDrop/DragInfo.cs

+5-6
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@
1010
namespace GongSolutions.Wpf.DragDrop
1111
{
1212
/// <summary>
13-
/// Holds information about a the source of a drag drop operation.
13+
/// Holds information about the source of a drag drop operation.
1414
/// </summary>
15-
///
1615
/// <remarks>
17-
/// The <see cref="DragInfo"/> class holds all of the framework's information about the source
18-
/// of a drag. It is used by <see cref="IDragSource.StartDrag"/> to determine whether a drag
16+
/// The <see cref="DragInfo"/> class holds all the framework's information about the source
17+
/// of a drag. It is used by <see cref="IDragSource.StartDrag"/> to determine whether a drag
1918
/// can start, and what the dragged data should be.
2019
/// </remarks>
2120
public class DragInfo : IDragInfo
@@ -167,7 +166,7 @@ public DragInfo(object sender, object originalSource, MouseButton mouseButton, F
167166
this.SourceItems = selectedItems;
168167

169168
// Some controls (I'm looking at you TreeView!) haven't updated their
170-
// SelectedItem by this point. Check to see if there 1 or less item in
169+
// SelectedItem by this point. Check to see if there 1 or less item in
171170
// the SourceItems collection, and if so, override the control's SelectedItems with the clicked item.
172171
//
173172
// The control has still the old selected items at the mouse down event, so we should check this and give only the real selected item to the user.
@@ -209,7 +208,7 @@ internal void RefreshSelectedItems(object sender)
209208
this.SourceItems = selectedItems;
210209

211210
// Some controls (I'm looking at you TreeView!) haven't updated their
212-
// SelectedItem by this point. Check to see if there 1 or less item in
211+
// SelectedItem by this point. Check to see if there 1 or less item in
213212
// the SourceItems collection, and if so, override the control's SelectedItems with the clicked item.
214213
//
215214
// The control has still the old selected items at the mouse down event, so we should check this and give only the real selected item to the user.
+43-42
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,59 @@
1-
namespace GongSolutions.Wpf.DragDrop;
2-
3-
using System.ComponentModel;
1+
using System.ComponentModel;
42
using System.Runtime.CompilerServices;
53
using JetBrains.Annotations;
64

7-
/// <summary>
8-
/// Data presented in drop hint adorner.
9-
/// </summary>
10-
public class DropHintData : INotifyPropertyChanged
5+
namespace GongSolutions.Wpf.DragDrop
116
{
12-
private DropHintState hintState;
13-
private string hintText;
14-
15-
public DropHintData(DropHintState hintState, string hintText)
16-
{
17-
this.HintState = hintState;
18-
this.HintText = hintText;
19-
}
20-
217
/// <summary>
22-
/// The hint text to display to the user. See <see cref="IDropInfo.DropHintText"/>
23-
/// and <see cref="IDropHintInfo.DropHintText"/>.
8+
/// Data presented in drop hint adorner.
249
/// </summary>
25-
public string HintText
10+
public class DropHintData : INotifyPropertyChanged
2611
{
27-
get => this.hintText;
28-
set
12+
private DropHintState hintState;
13+
private string hintText;
14+
15+
public DropHintData(DropHintState hintState, string hintText)
2916
{
30-
if (value == this.hintText) return;
31-
this.hintText = value;
32-
this.OnPropertyChanged();
17+
this.HintState = hintState;
18+
this.HintText = hintText;
3319
}
34-
}
3520

36-
/// <summary>
37-
/// The hint state to display different colors for hints. See <see cref="IDropInfo.DropTargetHintState"/>
38-
/// and <see cref="IDropHintInfo.DropTargetHintState"/>.
39-
/// </summary>
40-
public DropHintState HintState
41-
{
42-
get => this.hintState;
43-
set
21+
/// <summary>
22+
/// The hint text to display to the user. See <see cref="IDropInfo.DropHintText"/>
23+
/// and <see cref="IDropHintInfo.DropHintText"/>.
24+
/// </summary>
25+
public string HintText
4426
{
45-
if (value == this.hintState) return;
46-
this.hintState = value;
47-
this.OnPropertyChanged();
27+
get => this.hintText;
28+
set
29+
{
30+
if (value == this.hintText) return;
31+
this.hintText = value;
32+
this.OnPropertyChanged();
33+
}
34+
}
35+
36+
/// <summary>
37+
/// The hint state to display different colors for hints. See <see cref="IDropInfo.DropTargetHintState"/>
38+
/// and <see cref="IDropHintInfo.DropTargetHintState"/>.
39+
/// </summary>
40+
public DropHintState HintState
41+
{
42+
get => this.hintState;
43+
set
44+
{
45+
if (value == this.hintState) return;
46+
this.hintState = value;
47+
this.OnPropertyChanged();
48+
}
4849
}
49-
}
5050

51-
public event PropertyChangedEventHandler PropertyChanged;
51+
public event PropertyChangedEventHandler PropertyChanged;
5252

53-
[NotifyPropertyChangedInvocator]
54-
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
55-
{
56-
this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
53+
[NotifyPropertyChangedInvocator]
54+
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
55+
{
56+
this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
57+
}
5758
}
5859
}

0 commit comments

Comments
 (0)