This is a Free to Use WPF controls library. New controls will be added to this frequently.
Requires .Net v4.6.2 (min) to work.
Newer version will always be backward compatible.
Contents:
v1.0.0
- FileBrowser Control
v1.0.1
- OnOffSwitch Control
- StatusLED Control
v1.0.2 (Requires Microsoft.Ink.dll)
- ScribblePanel Control
Usage in xaml:
Add the following 2 Namespaces:
xmlns:ctrl="clr-namespace:IvaanUI.Controls.FileSystem;assembly=IvaanUI.Controls" xmlns:ctrlMdl="clr-namespace:IvaanUI.Models.UI;assembly=IvaanUI.Models"
Then add the control:
<ctrl:FileBrowser Name="FileDialog" FileTypeFilter="All Files (*.*)|Excel 97-2003 (*.xls)| Excel (*.xlsx) |Text File (*.txt)|Xml File (*.xml)|Zip Archive (*.zip)"> <ctrl:FileBrowser.CustomQuickLinkItems> <ctrlMdl:QuickLink Name="Junk" Path="C:\Junk" IconUri="C:\JUNK\Junk.png"/> <ctrlMdl:QuickLink Name="Source Code" Path="C:\Folder123\MyCode\" IconUri="C:\JUNK\Code.png"/> </ctrl:FileBrowser.CustomQuickLinkItems> </ctrl:FileBrowser>
In code behind:
Within main constructor (after InitializeComponent())
FileDialog.OpenCommand = FileOpened; FileDialog.CancelCommand = BrowserClosed;
Below are example handler methods for File Opened or Cancel clicked scenario:
private void FileOpened(string path) { MessageBox.Show($"Opening File: {path}"); } private void BrowserClosed() { MessageBox.Show("File Browser Closed"); }
Add the following Namespace:
xmlns:ctrl="clr-namespace:IvaanUI.Controls.Buttons;assembly=IvaanUI.Controls"
Then add the control:
<ctrl:OnOffSwitch OnStateText="On" OffStateText="Off" Height="30" Width="80"/> <ctrl:OnOffSwitch OnStateText="Allow" OffStateText="Block" Height="30" Width="100" Margin="0 100 0 0"/> <ctrl:OnOffSwitch OnStateText="" OffStateText="" Height="30" Width="80" Margin="0 200 0 0"/>
Add the following 2 Namespaces:
xmlns:ctrl="clr-namespace:IvaanUI.Controls.Buttons;assembly=IvaanUI.Controls"
xmlns:ctrlMdl="clr-namespace:IvaanUI.Models.UI;assembly=IvaanUI.Models"
Then add the control:
<ctrl:StatusLED Height="40" Width="40" ToolTip="Gray" Clicked="{Binding Something}" Status="None"/> <ctrl:StatusLED Height="40" Width="40" Margin="120 0 0 0" ToolTip="Blue" Status="Info"/> <ctrl:StatusLED Height="40" Width="40" Margin="240 0 0 0" ToolTip="Green" Status="Success"/> <ctrl:StatusLED Height="40" Width="40" Margin="360 0 0 0" ToolTip="Yellow" Status="Warning"/> <ctrl:StatusLED Height="40" Width="40" Margin="480 0 0 0" ToolTip="Red" Status="Danger"/>
Add the following Namespace:
xmlns:ctrl="clr-namespace:IvaanUI.Controls.Panels;assembly=IvaanUI.Controls"
Then add the control:
<ctrl:ScribblePanel Name="Pen" Height="180" Width="400" />
To use the Predicted text bind to the Text property of ScribblePanel like:
<TextBlock FontSize="32" Text="{Binding Text, ElementName=Pen}" Foreground="DarkOrange" HorizontalAlignment="Center" TextAlignment="Center" Margin="0 30"/>