WPF.Clippy
1.0.0
dotnet add package WPF.Clippy --version 1.0.0
NuGet\Install-Package WPF.Clippy -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="WPF.Clippy" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add WPF.Clippy --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: WPF.Clippy, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install WPF.Clippy as a Cake Addin #addin nuget:?package=WPF.Clippy&version=1.0.0 // Install WPF.Clippy as a Cake Tool #tool nuget:?package=WPF.Clippy&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Clippy.WPF
Clippy.WPF is a C# library which allows the creation and interaction of Clippy characters.
Features
- Create and how animation Clippy characters
- Bonzi
- Clippy
- F1
- Genie
- Genius
- Links
- Merlin
- Peedy
- Rocky
- Rover
- Play any supported animation (looping and one shot)
- Show & Hide support (including animation)
- Events for animation complete
- Handle double-click events
- Say text messages
- Say custom
FrameworkElement
messages - Get and set Clippy character location
Missing Features
- Audio
- Events for message show/dismiss
- Custom Clippy characters
Thanks
Many thanks to the ClippyJS library which provided art and animation data used by this project.
API
Creating, showing and closing characters
// Create the instance of the character we want
var character = new ClippyCharacter(Character.Clippy);
// Show will present the character as a top most window
character.Show();
// Hides a character, hidden characters can be re-shown by calling Show() again.
character.Hide();
// Dismisses a character, a dismissed character can not be reshown and must be recreated
character.Close();
Animations
// Get a list of all supported animations for the character
var animations = character.AnimationNames;
// Loop an animation until a different animation is requested
character.PlayAnimation("Idle", AnimationMode.Loop);
// Play an animation once
// When it completes the previous animation will be resumed
character.PlayAnimation("Wave", AnimationMode.Once);
// Get the name of the currently active looping animation
var activeLoopAnimation = character.GetActiveAnimation(AnimationMode.Loop);
Events
// Subscribe to character double click events
character.OnDoubleClick += HandleDoubleClick;
// Called when a character is double clicked
void HandleDoubleClick(ClippyCharacter character)
{
}
// Subscribe to character location changed events
character.LocationChanged += HandleLocationChanged;
// Called when a characters location has changed
void HandleLocationChanged(ClippyCharacter character, Point location)
{
}
// Subscribe to character animation completed events
character.OnAnimationCompleted += HandleAnimationCompleted;
// Called when a characters animation has completed
void OnCharacterAnimationComplete(ClippyCharacter sender, string animationName, AnimationMode mode)
{
}
Speech
// Display a text message, which will be automatically dismissed after 4 seconds
character.Say("Hello!", TimeSpan.FromSeconds(4));
// Show a custom control in a speech bubble.
// If no TimeSpan dismiss timout is specified, the speech bubble will be shown indefinatly
character.Say(new TextBlock
{
Text = "RAWR",
Foreground = Brushes.Red
});
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net48 is compatible. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.8
- System.Numerics.Vectors (>= 4.5.0)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
- System.Text.Json (>= 8.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 166 | 6/22/2024 |
Initial public release.