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 OpenIdConnectClientCredentialsHandler : DelegatingHandler | |
{ | |
private readonly OpenIdConnectClientCredentialsHandlerOptions _options = null; | |
private readonly HttpClient _tokenClient = null; | |
private TokenResponse _tokenResponse = null; | |
private DateTime _tokenExpires; | |
private Task _retreiveTokenTask = null; |
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
<ResourceDictionary> | |
<BitmapImage x:Key="placeholder1" UriSource="/Images/thumb.png" /> | |
</ResourceDictionary> | |
<ImageEx PlaceholderSource={StaticResource placeholder1} /> |
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 static class ImageUtils | |
{ | |
public static async Task<IRandomAccessStream> ScaleImage(Stream inputStream, uint targetWidth, uint targetHeight) | |
{ | |
InMemoryRandomAccessStream ras = new InMemoryRandomAccessStream(); | |
var decoder = await BitmapDecoder.CreateAsync(inputStream.AsRandomAccessStream()); | |
PixelDataProvider data = await decoder.GetPixelDataAsync(); |