Skip to content

Instantly share code, notes, and snippets.

Avatar

Sandor sandorfr

View GitHub Profile
@sandorfr
sandorfr / MacSignatureProviderFactory.cs
Last active Mar 3, 2021
Jwt HmacSha256 aps.net 5 beta7 workaround
View MacSignatureProviderFactory.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace System.IdentityModel.Tokens
{
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
View DispatcherW8-Clean.cs
await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(new CoreDispatcherPriority(), action);
View clean.cs
public DateTimeOffset? SelectedDate
{
get { return (DateTimeOffset?)GetValue(SelectedDateProperty); }
set { SetValue(SelectedDateProperty, value); }
}
public static readonly DependencyProperty SelectedDateProperty =
DependencyProperty.Register("SelectedDate", typeof(DateTimeOffset?), typeof(DataTimePicker), new PropertyMetadata(null, OnSelectedDateChanged));
View Override-Name.xaml
<Button Style="{StaticResource HomeAppBarButtonStyle}" AutomationProperties.Name="Test" />
View AsyncDelegateCommand.cs
using System;
using System.Threading.Tasks;
using System.Windows.Input;
namespace ImprovedDelegateCommand
{
public class AsyncDelegateCommand<T> : ICommand
{
private Func<T, bool> canExecute;
private Func<T, Task> execute;