Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/newky2k/wpfwizardcontrol
WPF Wizard control for .Net Core 3.x and .Net framework
https://github.com/newky2k/wpfwizardcontrol
wpf wpf-ui wpf-ui-controls
Last synced: about 1 month ago
JSON representation
WPF Wizard control for .Net Core 3.x and .Net framework
- Host: GitHub
- URL: https://github.com/newky2k/wpfwizardcontrol
- Owner: newky2k
- License: mit
- Created: 2017-04-22T20:32:33.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-11-19T21:06:40.000Z (3 months ago)
- Last Synced: 2024-12-06T22:48:33.594Z (about 2 months ago)
- Topics: wpf, wpf-ui, wpf-ui-controls
- Language: C#
- Homepage:
- Size: 295 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dsoft.WizardControl.WPF
Dsoft.WizardControl.WPF is a simple user control for WPFIt supports
- Databiding
- Multiple pages
- Validation
- Themeing## Getting Started
The WPF Wizard control is a `UserControl` based element and so it be used in other `UserControl` objects or directly in a `Window`
Install the Nuget package into you project via the Package Management Console
Install-Package Dsoft.WizardControl.WPF
Or install it via the Visual Studio Nuget Manager
In your `Window` or `UserControl` add a new namespace
xmlns:wizard="clr-namespace:Dsoft.WizardControl.WPF;assembly=Dsoft.WizardControl.WPF"
Then you can add the `WizardControl` to the xaml
` object which can be databound to a viewmodel or provided explicitly.The `Title`, `CancelCommand` and `FinishCommand` can also be databound or provided explicitly.
Below is an example ViewModel using `System.Mvvm`
public class MainWindowViewModel : ViewModel
{public string Title
{
get { return _title; }
set { _title = value; NotifyPropertyChanged("Title"); }
}public ObservableCollection Pages
{
get { return _pages; }
set { _pages = value; NotifyPropertyChanged("Pages"); }
}public ICommand CancelCommand
{
get
{
return new DelegateCommand(() =>
{
MessageBox.Show("Bye!");OnRequestCloseWindow?.Invoke(this, false);
});
}
}public ICommand FinishCommand
{
get
{
return new DelegateCommand(() =>
{
MessageBox.Show("Fin!");OnRequestCloseWindow?.Invoke(this, false);
});
}
}
}## Theming
The appearance of the `WizardControl` header can be modified by overriding the theme
You can also change the `ButtonStyle` in the same way
Example styling xaml that can be added to the App.xaml or other xaml resource file
xmlns:wizcont="clr-namespace:Dsoft.WizardControl.WPF;assembly=Dsoft.WizardControl.WPF"
<Setter Property="ButtonStyle" Value="{StaticResource AccentedSquareButtonStyle}" />
<Setter Property="HeaderTemplate">
<Setter.Value>
<DataTemplate>
<StackPanel VerticalAlignment="Center" Orientation="Vertical" Margin="5">
<TextBlock Text="{Binding Title,FallbackValue=Heading}" FontSize="36" Foreground="{StaticResource AccentColorBrush}"/>
<TextBlock Text="{Binding SubTitle,FallbackValue=SubHeading}" FontSize="12" Foreground="Gray"/>
</StackPanel>
</DataTemplate>
</Setter.Value>
</Setter>