This file contains hidden or 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
public class TextBoxUpdateSourceOnTextChangedBehavior | |
: Behavior<TextBox> | |
{ | |
#region Properties | |
public static readonly DependencyProperty UpdateSourceOnTextChangedProperty = DependencyProperty.Register(nameof(UpdateSourceOnTextChanged), | |
typeof(bool), | |
typeof(TextBoxUpdateSourceOnTextChangedBehavior), | |
new PropertyMetadata(false)); |
This file contains hidden or 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
# Useful pckages for all kind of projects | |
Install-Package Microsoft.Extensions.DependencyInjection | |
Install-Package Microsoft.Extensions.Logging | |
Install-Package Microsoft.Extensions.Logging.Debug | |
Install-Package Microsoft.Extensions.Logging.Configuration | |
Install-Package Microsoft.Extensions.Configuration | |
Install-Package Microsoft.Extensions.Configuration.Json | |
Install-Package Microsoft.Extensions.Configuration.Binder |
This file contains hidden or 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
public class ByteArrayToImageConverter | |
: IValueConverter | |
{ | |
#region Methods | |
public object? Convert(object? value, Type? targetType, object? parameter, string? language) | |
{ | |
if (value is byte[] bytes && bytes.Length > 0) | |
{ | |
return LoadImage(bytes); |
This file contains hidden or 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
public class EnumerableCountToBoolConverter | |
: IValueConverter | |
{ | |
#region Methods | |
public object? Convert(object? value, Type targetType, object? parameter, string? language) | |
{ | |
if (value is IEnumerable enumerable) | |
{ | |
foreach (var item in enumerable) | |
// Return true if theres at least one element in the collection |