-
-
Notifications
You must be signed in to change notification settings - Fork 410
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #489 from mangoyoga80/features/DropTargetHint
DropTarget hint and DropHighlightAdorner background brush
- Loading branch information
Showing
29 changed files
with
1,037 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
using System.ComponentModel; | ||
using System.Runtime.CompilerServices; | ||
using JetBrains.Annotations; | ||
|
||
namespace GongSolutions.Wpf.DragDrop | ||
{ | ||
/// <summary> | ||
/// Data presented in drop hint adorner. | ||
/// </summary> | ||
public class DropHintData : INotifyPropertyChanged | ||
{ | ||
private DropHintState hintState; | ||
private string hintText; | ||
|
||
public DropHintData(DropHintState hintState, string hintText) | ||
{ | ||
this.HintState = hintState; | ||
this.HintText = hintText; | ||
} | ||
|
||
/// <summary> | ||
/// The hint text to display to the user. See <see cref="IDropInfo.DropHintText"/> | ||
/// and <see cref="IDropHintInfo.DropHintText"/>. | ||
/// </summary> | ||
public string HintText | ||
{ | ||
get => this.hintText; | ||
set | ||
{ | ||
if (value == this.hintText) return; | ||
this.hintText = value; | ||
this.OnPropertyChanged(); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// The hint state to display different colors for hints. See <see cref="IDropInfo.DropTargetHintState"/> | ||
/// and <see cref="IDropHintInfo.DropTargetHintState"/>. | ||
/// </summary> | ||
public DropHintState HintState | ||
{ | ||
get => this.hintState; | ||
set | ||
{ | ||
if (value == this.hintState) return; | ||
this.hintState = value; | ||
this.OnPropertyChanged(); | ||
} | ||
} | ||
|
||
public event PropertyChangedEventHandler PropertyChanged; | ||
|
||
[NotifyPropertyChangedInvocator] | ||
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) | ||
{ | ||
this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); | ||
} | ||
} | ||
} |
Oops, something went wrong.