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
<Grid> | |
<TextBlock Text="This is a title" Style="{ThemeResource TitleTextBlockStyle}" /> | |
<Image Source="/Assets/Background.jpg" Stretch="UniformToFill" /> | |
</Grid> |
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
var view = item.Content; | |
if (view.Contains(StandardDataFormats.Bitmap)) | |
{ | |
var bitmapReference = await view.GetBitmapAsync(); | |
if (bitmapReference != null) | |
{ | |
var bitmap = new BitmapImage(); | |
await bitmap.SetSourceAsync(await bitmapReference.OpenReadAsync()); | |
viewer.ContentGrid.Children.Add(new Image() { Width = 300, Height = 300, Stretch = Stretch.None, Source = bitmap }); | |
} |
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
var historyItems = await Clipboard.GetHistoryItemsAsync(); | |
if (historyItems.Status == ClipboardHistoryItemsResultStatus.Success) | |
{ | |
foreach (var item in historyItems.Items) | |
{ | |
// ... | |
} | |
} |
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
Clipboard.HistoryEnabledChanged += (S,e) => | |
{ | |
if (Clipboard.IsHistoryEnabled()) | |
{ | |
// Retrieve history items | |
} | |
} |
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
await Launcher.LaunchUriAsync("ms-settings:clipboard"); |
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
if (Clipboard.IsHistoryEnabled()) | |
{ | |
// Retrieve history items | |
} |
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
// Get number of times the app has been launched | |
LaunchTracker.Current.LaunchCount | |
// Get the time when the current instance of app has been launched | |
LaunchTracker.Current.CurrentLaunchDate | |
// Get the time the app has been launched last time | |
LaunchTracker.Current.PreviousLaunchDate |
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
if (LaunchTracker.Current.IsFirstLaunch) | |
{ | |
// Display pop-up alert for first launch | |
} | |
if (LaunchTracker.Current.IsFirstLaunchForCurrentVersion) | |
{ | |
// Display update notification for current version (1.0.0) | |
} |
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
if (Settings.IsFirstRun) | |
{ | |
// Do something. | |
Settings.IsFirstRun = 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
public static class Settings | |
{ | |
private static ApplicationDataContainer _settings = ApplicationData.Current.LocalSettings; | |
public static bool IsFirstRun | |
{ | |
get | |
{ | |
if (_settings.Values.TryGetValue(nameof(IsFirstRun), out var isFirstRun)) | |
{ |