Tpig.Components.TogetherUi
0.1.2
See the version list below for details.
dotnet add package Tpig.Components.TogetherUi --version 0.1.2
NuGet\Install-Package Tpig.Components.TogetherUi -Version 0.1.2
<PackageReference Include="Tpig.Components.TogetherUi" Version="0.1.2" />
paket add Tpig.Components.TogetherUi --version 0.1.2
#r "nuget: Tpig.Components.TogetherUi, 0.1.2"
// Install Tpig.Components.TogetherUi as a Cake Addin #addin nuget:?package=Tpig.Components.TogetherUi&version=0.1.2 // Install Tpig.Components.TogetherUi as a Cake Tool #tool nuget:?package=Tpig.Components.TogetherUi&version=0.1.2
Tpig.Components.Together and Tpig.Components.TogetherUi, .NET Version
Together codes for .NET version.
It's my work on C# .NET WPF and make libraries to reduce my time. Later, I decide to merge these:
- Audio
- CustomUi, mostly Dialog Boxes
- Single Window, at that time, it is Navigators
- Soft Keyboards
- Generic Helpers
- Expanded Dialog Boxes and SceneTimer, which used with Single Window
and fix null warning.
Features
Animation
Please see demo in various code, such as: Tpig.Demonstrates.SingleWindow, to see how Animates work.
Please see demo about SequenceAnimation and SequenceAnimationRenderer in Tpig.Demonstrates.SequenceAnim.
Behaviors
Please see demo about behaviors in Tpig.Demonstrates.Behaviors.
Dialog Box
The dialog boxes have 6 classes to disable current UI, wait for something, and enable again. They are:
- AlphaWaitControl and AlphaWaitWindow
- ExpandedWaitControl and ExpandedWaitWindow
- WaitControl and WaitWindow
It provide classes to display message box. They are:
- MessageWindow and ExpandedMessageWindow
Please see demo about dialog box(es) in Tpig.Demonstrates.DialogBox and Tpig.Demonstrates.ExpandedDialogBox.
| | |
Audio
A simple audio, backend NAudio, playing.
Create:
var audio = new AudioFile(dialog.FileName);
-- or --
var audio = new AudioFile(dialog.FileName, true); // for tolerate file not found error
Play, Pause, Resume and Stop:
audio.Play();
audio.Pause();
audio.Resume();
audio.Stop();
Set volume, 0 to 1:
audio.Volume = 0.5;
Repeat, or just stop when audio file end:
audio.IsRepeat = true/false;
Destroy (optional):
audio.Dispose();
Please see demo about play audio in Tpig.Demonstrates.Audio.
Single Window
When I work in old company. It not well to use window. So, I still to UserControl and add features:
- Animation, when page switching
- Back and Next
- Scene timer to limit and return first page
and I call these navigator, because the call Back and Next is almost automatic.
I change it name to Single Window, same as SPA == Single Page Application on web, when I want to merge code.
Please see demo about single window in Tpig.Demonstrates.SingleWindow.
|
Soft Keyboards
.NET WPF component for virtual keyboards.
First, add this line in xaml:
xmlns:kb="clr-namespace:Tpig.Components.TogetherUi;assembly=Tpig.Components.TogetherUi"
Then, put this line to instance soft-keyboard, this must be top:
<kb:SoftKeyboardControl x:Name="SoftKeyboardControl"/>
Then, there are 2 ways to attach soft-keyboards:
- use attach property, which is simple but less configure
- use behavior
When you want to use attach property, here:
<TextBox kb:AutoSoftKeyboardBehavior.UseSoftKeyboard="True"/>
If you want to use behavior, add this line:
xmlns:be="http://schemas.microsoft.com/xaml/behaviors"
Then:
<TextBox>
<be:Interaction.Behaviors>
<kb:SoftKeyboardBehavior SoftKeyboardType="International"/>
</be:Interaction.Behaviors>
</TextBox>
You can set SoftKeyboardType as International, EnglishOnly and Numeric.
You can add language, like this:
Loaded += (sender, e) => {
Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)(() => {
SoftKeyboardControl.AddThaiLanguage();
}));
};
Sorry, I can use English and Thai only. If you want another language, you have to fork. See SoftKeyboardControl.AddThaiLanguage() as basis.
Please see demo about soft keyboards in Tpig.Demonstrates.SoftKeyboards.
|
Thank For These People
Loading image, don't know where I get it, sorry T_T
GetDescendantByType, I can't remember this function, sorry T_T
Last
Sorry, but I'm not good at English. T_T
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0-windows7.0 is compatible. net7.0-windows was computed. net8.0-windows was computed. |
-
net6.0-windows7.0
- InputSimulatorStandard (>= 1.0.0)
- Microsoft.Xaml.Behaviors.Wpf (>= 1.1.122)
- NAudio (>= 2.2.1)
- System.Drawing.Common (>= 8.0.7)
- System.Management (>= 8.0.0)
- Tpig.Components.Localization (>= 1.2.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.