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 FileExtensions | |
{ | |
private static readonly string LocalFolder; | |
static FileExtensions() | |
{ | |
// Gets the target platform's valid save location | |
LocalFolder = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); | |
} |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:dataControls="clr-namespace:Telerik.XamarinForms.DataControls;assembly=Telerik.XamarinForms.DataControls" | |
xmlns:input="clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input" | |
x:Class="TelerikXamarinApp1.Portable.StartPage"> | |
<Grid> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="Auto" /> |
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
using Telerik.XamarinForms.Common; | |
using Xamarin.Forms; | |
namespace YourAwesomeApp.Helpers | |
{ | |
public static class ThemeHelper | |
{ | |
public static void ChangeTheme(string themeName) | |
{ | |
if(Application.Current.Resources != 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 xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
x:Class="TelerikXamarinApp1.Portable.Themes.CustomTheme"> | |
<!-- Chart --> | |
<Color x:Key="ChartAxisColor">#919191</Color> | |
<Color x:Key="ChartGridLinesColor">#D9D9D9</Color> | |
<!-- ListView --> | |
<Color x:Key="ListViewItemBorderColor">Azure</Color> |
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 ItemViewModel | |
{ | |
public string Title { get; set; } | |
public string ThumbnailUrl { get; set; } | |
public List<string> Details { get; set; } | |
} |
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
using System.Collections.ObjectModel; | |
using System.ComponentModel; | |
using System.Runtime.CompilerServices; | |
using DetailsDrawer.Annotations; | |
namespace DetailsDrawer.ViewModels | |
{ | |
public class MainPageViewModel : INotifyPropertyChanged | |
{ | |
private ObservableCollection<RouteStep> routeSteps; |
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
using Windows.UI.Xaml; | |
using Windows.UI.Xaml.Controls; | |
using Windows.UI.Xaml.Input; | |
using Windows.UI.Xaml.Media; | |
namespace DetailsDrawer | |
{ | |
public sealed partial class MainPage : Page | |
{ | |
public MainPage() |
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
<Page x:Class="DetailsDrawer.MainPage" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:local="using:DetailsDrawer" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:viewModels="using:DetailsDrawer.ViewModels" | |
mc:Ignorable="d"> | |
<Page.DataContext> |
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
[DataContract] | |
public class ThemeModel : INotifyPropertyChanged | |
{ | |
private Color backgroundColor; | |
private Color textColor; | |
private Color buttonBackgroundColor; | |
private Color buttonTextColor; | |
private Color accentColor; | |
private Color headerColor; |
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 FadeHeaderBehavior : Behavior<FrameworkElement> | |
{ | |
public static readonly DependencyProperty HeaderElementProperty = DependencyProperty.Register( | |
"HeaderElement", typeof(UIElement), typeof(FadeHeaderBehavior), new PropertyMetadata(null, PropertyChangedCallback)); | |
public UIElement HeaderElement | |
{ | |
get { return (UIElement) GetValue(HeaderElementProperty); } | |
set { SetValue(HeaderElementProperty, value); } | |
} |