├── .gitignore └── PullToRefresh ├── PullToRefresh.sln └── PullToRefresh ├── PullToRefresh.Shared ├── App.xaml ├── App.xaml.cs ├── Controls │ └── PullToRefreshScrollViewer.cs ├── Images │ ├── 1.jpg │ ├── 2.jpg │ ├── 3.jpg │ └── 4.jpg ├── MainPage.xaml ├── MainPage.xaml.cs ├── PullToRefresh.Shared.projitems ├── PullToRefresh.Shared.shproj ├── Themes │ └── Generic.xaml └── ViewModel │ ├── MainViewModel.cs │ └── ViewModelLocator.cs ├── PullToRefresh.Windows ├── Assets │ ├── Logo.scale-100.png │ ├── SmallLogo.scale-100.png │ ├── SplashScreen.scale-100.png │ └── StoreLogo.scale-100.png ├── Package.appxmanifest ├── Properties │ └── AssemblyInfo.cs ├── PullToRefresh.Windows.csproj ├── PullToRefresh.Windows_TemporaryKey.pfx └── packages.config └── PullToRefresh.WindowsPhone ├── Assets ├── Logo.scale-240.png ├── SmallLogo.scale-240.png ├── SplashScreen.scale-240.png ├── Square71x71Logo.scale-240.png ├── StoreLogo.scale-240.png └── WideLogo.scale-240.png ├── Package.appxmanifest ├── Properties └── AssemblyInfo.cs ├── PullToRefresh.WindowsPhone.csproj └── packages.config /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Fody //Thx scott Lovegrove 3 | ################# 4 | !Tools/Fody/* 5 | 6 | AppPackages/ 7 | 8 | ################# 9 | ## Project specific 10 | ################# 11 | SkyDriveAccess.txt 12 | 13 | ################# 14 | ## Eclipse 15 | ################# 16 | 17 | *.pydevproject 18 | .project 19 | .metadata 20 | bin/ 21 | tmp/ 22 | *.tmp 23 | *.bak 24 | *.swp 25 | *~.nib 26 | local.properties 27 | .classpath 28 | .settings/ 29 | .loadpath 30 | 31 | # External tool builders 32 | .externalToolBuilders/ 33 | 34 | # Locally stored "Eclipse launch configurations" 35 | *.launch 36 | 37 | # CDT-specific 38 | .cproject 39 | 40 | # PDT-specific 41 | .buildpath 42 | 43 | 44 | ################# 45 | ## Visual Studio 46 | ################# 47 | 48 | ## Ignore Visual Studio temporary files, build results, and 49 | ## files generated by popular Visual Studio add-ons. 50 | 51 | # User-specific files 52 | *.suo 53 | *.user 54 | *.sln.docstates 55 | *.nupkg 56 | 57 | # Build results 58 | [Dd]ebug/ 59 | [Rr]elease/ 60 | *_i.c 61 | *_p.c 62 | *.ilk 63 | *.meta 64 | *.obj 65 | *.pch 66 | *.pdb 67 | *.pgc 68 | *.pgd 69 | *.rsp 70 | *.sbr 71 | *.tlb 72 | *.tli 73 | *.tlh 74 | *.tmp 75 | *.vspscc 76 | .builds 77 | *.dotCover 78 | 79 | 80 | ## TODO: If you have NuGet Package Restore enabled, uncomment this 81 | packages/ 82 | 83 | # Visual C++ cache files 84 | ipch/ 85 | *.aps 86 | *.ncb 87 | *.opensdf 88 | *.sdf 89 | 90 | # Visual Studio profiler 91 | *.psess 92 | *.vsp 93 | 94 | # ReSharper is a .NET coding add-in 95 | _ReSharper* 96 | *.sln.ide 97 | 98 | # Installshield output folder 99 | [Ee]xpress 100 | 101 | # DocProject is a documentation generator add-in 102 | DocProject/buildhelp/ 103 | DocProject/Help/*.HxT 104 | DocProject/Help/*.HxC 105 | DocProject/Help/*.hhc 106 | DocProject/Help/*.hhk 107 | DocProject/Help/*.hhp 108 | DocProject/Help/Html2 109 | DocProject/Help/html 110 | 111 | # Click-Once directory 112 | publish 113 | 114 | # Others 115 | [Bb]in 116 | [Oo]bj 117 | sql 118 | TestResults 119 | *.Cache 120 | ClientBin 121 | stylecop.* 122 | ~$* 123 | *.dbmdl 124 | Generated_Code #added for RIA/Silverlight projects 125 | 126 | # Backup & report files from converting an old project file to a newer 127 | # Visual Studio version. Backup files are not needed, because we have git ;-) 128 | _UpgradeReport_Files/ 129 | Backup*/ 130 | UpgradeLog*.XML 131 | 132 | 133 | 134 | ############ 135 | ## Windows 136 | ############ 137 | 138 | # Windows image file caches 139 | Thumbs.db 140 | 141 | # Folder config file 142 | Desktop.ini 143 | 144 | 145 | ############# 146 | ## Python 147 | ############# 148 | 149 | *.py[co] 150 | 151 | # Packages 152 | *.egg 153 | *.egg-info 154 | dist 155 | build 156 | eggs 157 | parts 158 | bin 159 | var 160 | sdist 161 | develop-eggs 162 | .installed.cfg 163 | 164 | # Installer logs 165 | pip-log.txt 166 | 167 | # Unit test / coverage reports 168 | .coverage 169 | .tox 170 | 171 | #Translations 172 | *.mo 173 | 174 | #Mr Developer 175 | .mr.developer.cfg 176 | 177 | # Mac crap 178 | .DS_Store 179 | 180 | lib 181 | PullToRefresh/.nuget/* 182 | -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.31101.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PullToRefresh", "PullToRefresh", "{ED8C6995-EB40-4989-837D-6438BB7F72E2}" 7 | EndProject 8 | Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "PullToRefresh.Shared", "PullToRefresh\PullToRefresh.Shared\PullToRefresh.Shared.shproj", "{A5CF64FA-0711-4DD6-AF22-0B65C7DAFD4B}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PullToRefresh.Windows", "PullToRefresh\PullToRefresh.Windows\PullToRefresh.Windows.csproj", "{FF56FBE8-7E4C-4347-9AFF-91076B53722D}" 11 | EndProject 12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PullToRefresh.WindowsPhone", "PullToRefresh\PullToRefresh.WindowsPhone\PullToRefresh.WindowsPhone.csproj", "{94A3EFD3-29A1-4B16-883D-BA50E0229C10}" 13 | EndProject 14 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{077272AB-CEE7-4002-90A3-FCC26C1D4F06}" 15 | ProjectSection(SolutionItems) = preProject 16 | .nuget\NuGet.Config = .nuget\NuGet.Config 17 | .nuget\NuGet.exe = .nuget\NuGet.exe 18 | .nuget\NuGet.targets = .nuget\NuGet.targets 19 | EndProjectSection 20 | EndProject 21 | Global 22 | GlobalSection(SharedMSBuildProjectFiles) = preSolution 23 | PullToRefresh\PullToRefresh.Shared\PullToRefresh.Shared.projitems*{a5cf64fa-0711-4dd6-af22-0b65c7dafd4b}*SharedItemsImports = 13 24 | PullToRefresh\PullToRefresh.Shared\PullToRefresh.Shared.projitems*{94a3efd3-29a1-4b16-883d-ba50e0229c10}*SharedItemsImports = 4 25 | PullToRefresh\PullToRefresh.Shared\PullToRefresh.Shared.projitems*{ff56fbe8-7e4c-4347-9aff-91076b53722d}*SharedItemsImports = 4 26 | EndGlobalSection 27 | GlobalSection(CodealikeProperties) = postSolution 28 | SolutionGuid = be455a90-cc49-4270-b534-6ccb19616bfa 29 | EndGlobalSection 30 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 31 | Debug|Any CPU = Debug|Any CPU 32 | Debug|ARM = Debug|ARM 33 | Debug|x64 = Debug|x64 34 | Debug|x86 = Debug|x86 35 | Release|Any CPU = Release|Any CPU 36 | Release|ARM = Release|ARM 37 | Release|x64 = Release|x64 38 | Release|x86 = Release|x86 39 | EndGlobalSection 40 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 41 | {FF56FBE8-7E4C-4347-9AFF-91076B53722D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 42 | {FF56FBE8-7E4C-4347-9AFF-91076B53722D}.Debug|Any CPU.Build.0 = Debug|Any CPU 43 | {FF56FBE8-7E4C-4347-9AFF-91076B53722D}.Debug|Any CPU.Deploy.0 = Debug|Any CPU 44 | {FF56FBE8-7E4C-4347-9AFF-91076B53722D}.Debug|ARM.ActiveCfg = Debug|ARM 45 | {FF56FBE8-7E4C-4347-9AFF-91076B53722D}.Debug|ARM.Build.0 = Debug|ARM 46 | {FF56FBE8-7E4C-4347-9AFF-91076B53722D}.Debug|ARM.Deploy.0 = Debug|ARM 47 | {FF56FBE8-7E4C-4347-9AFF-91076B53722D}.Debug|x64.ActiveCfg = Debug|x64 48 | {FF56FBE8-7E4C-4347-9AFF-91076B53722D}.Debug|x64.Build.0 = Debug|x64 49 | {FF56FBE8-7E4C-4347-9AFF-91076B53722D}.Debug|x64.Deploy.0 = Debug|x64 50 | {FF56FBE8-7E4C-4347-9AFF-91076B53722D}.Debug|x86.ActiveCfg = Debug|x86 51 | {FF56FBE8-7E4C-4347-9AFF-91076B53722D}.Debug|x86.Build.0 = Debug|x86 52 | {FF56FBE8-7E4C-4347-9AFF-91076B53722D}.Debug|x86.Deploy.0 = Debug|x86 53 | {FF56FBE8-7E4C-4347-9AFF-91076B53722D}.Release|Any CPU.ActiveCfg = Release|Any CPU 54 | {FF56FBE8-7E4C-4347-9AFF-91076B53722D}.Release|Any CPU.Build.0 = Release|Any CPU 55 | {FF56FBE8-7E4C-4347-9AFF-91076B53722D}.Release|Any CPU.Deploy.0 = Release|Any CPU 56 | {FF56FBE8-7E4C-4347-9AFF-91076B53722D}.Release|ARM.ActiveCfg = Release|ARM 57 | {FF56FBE8-7E4C-4347-9AFF-91076B53722D}.Release|ARM.Build.0 = Release|ARM 58 | {FF56FBE8-7E4C-4347-9AFF-91076B53722D}.Release|ARM.Deploy.0 = Release|ARM 59 | {FF56FBE8-7E4C-4347-9AFF-91076B53722D}.Release|x64.ActiveCfg = Release|x64 60 | {FF56FBE8-7E4C-4347-9AFF-91076B53722D}.Release|x64.Build.0 = Release|x64 61 | {FF56FBE8-7E4C-4347-9AFF-91076B53722D}.Release|x64.Deploy.0 = Release|x64 62 | {FF56FBE8-7E4C-4347-9AFF-91076B53722D}.Release|x86.ActiveCfg = Release|x86 63 | {FF56FBE8-7E4C-4347-9AFF-91076B53722D}.Release|x86.Build.0 = Release|x86 64 | {FF56FBE8-7E4C-4347-9AFF-91076B53722D}.Release|x86.Deploy.0 = Release|x86 65 | {94A3EFD3-29A1-4B16-883D-BA50E0229C10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 66 | {94A3EFD3-29A1-4B16-883D-BA50E0229C10}.Debug|Any CPU.Build.0 = Debug|Any CPU 67 | {94A3EFD3-29A1-4B16-883D-BA50E0229C10}.Debug|Any CPU.Deploy.0 = Debug|Any CPU 68 | {94A3EFD3-29A1-4B16-883D-BA50E0229C10}.Debug|ARM.ActiveCfg = Debug|ARM 69 | {94A3EFD3-29A1-4B16-883D-BA50E0229C10}.Debug|ARM.Build.0 = Debug|ARM 70 | {94A3EFD3-29A1-4B16-883D-BA50E0229C10}.Debug|ARM.Deploy.0 = Debug|ARM 71 | {94A3EFD3-29A1-4B16-883D-BA50E0229C10}.Debug|x64.ActiveCfg = Debug|Any CPU 72 | {94A3EFD3-29A1-4B16-883D-BA50E0229C10}.Debug|x64.Build.0 = Debug|Any CPU 73 | {94A3EFD3-29A1-4B16-883D-BA50E0229C10}.Debug|x64.Deploy.0 = Debug|Any CPU 74 | {94A3EFD3-29A1-4B16-883D-BA50E0229C10}.Debug|x86.ActiveCfg = Debug|x86 75 | {94A3EFD3-29A1-4B16-883D-BA50E0229C10}.Debug|x86.Build.0 = Debug|x86 76 | {94A3EFD3-29A1-4B16-883D-BA50E0229C10}.Debug|x86.Deploy.0 = Debug|x86 77 | {94A3EFD3-29A1-4B16-883D-BA50E0229C10}.Release|Any CPU.ActiveCfg = Release|Any CPU 78 | {94A3EFD3-29A1-4B16-883D-BA50E0229C10}.Release|Any CPU.Build.0 = Release|Any CPU 79 | {94A3EFD3-29A1-4B16-883D-BA50E0229C10}.Release|Any CPU.Deploy.0 = Release|Any CPU 80 | {94A3EFD3-29A1-4B16-883D-BA50E0229C10}.Release|ARM.ActiveCfg = Release|ARM 81 | {94A3EFD3-29A1-4B16-883D-BA50E0229C10}.Release|ARM.Build.0 = Release|ARM 82 | {94A3EFD3-29A1-4B16-883D-BA50E0229C10}.Release|ARM.Deploy.0 = Release|ARM 83 | {94A3EFD3-29A1-4B16-883D-BA50E0229C10}.Release|x64.ActiveCfg = Release|Any CPU 84 | {94A3EFD3-29A1-4B16-883D-BA50E0229C10}.Release|x64.Build.0 = Release|Any CPU 85 | {94A3EFD3-29A1-4B16-883D-BA50E0229C10}.Release|x64.Deploy.0 = Release|Any CPU 86 | {94A3EFD3-29A1-4B16-883D-BA50E0229C10}.Release|x86.ActiveCfg = Release|x86 87 | {94A3EFD3-29A1-4B16-883D-BA50E0229C10}.Release|x86.Build.0 = Release|x86 88 | {94A3EFD3-29A1-4B16-883D-BA50E0229C10}.Release|x86.Deploy.0 = Release|x86 89 | EndGlobalSection 90 | GlobalSection(SolutionProperties) = preSolution 91 | HideSolutionNode = FALSE 92 | EndGlobalSection 93 | GlobalSection(NestedProjects) = preSolution 94 | {A5CF64FA-0711-4DD6-AF22-0B65C7DAFD4B} = {ED8C6995-EB40-4989-837D-6438BB7F72E2} 95 | {FF56FBE8-7E4C-4347-9AFF-91076B53722D} = {ED8C6995-EB40-4989-837D-6438BB7F72E2} 96 | {94A3EFD3-29A1-4B16-883D-BA50E0229C10} = {ED8C6995-EB40-4989-837D-6438BB7F72E2} 97 | EndGlobalSection 98 | EndGlobal 99 | -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.Shared/App.xaml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.Shared/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Runtime.InteropServices.WindowsRuntime; 6 | using Windows.ApplicationModel; 7 | using Windows.ApplicationModel.Activation; 8 | using Windows.Foundation; 9 | using Windows.Foundation.Collections; 10 | using Windows.UI.Xaml; 11 | using Windows.UI.Xaml.Controls; 12 | using Windows.UI.Xaml.Controls.Primitives; 13 | using Windows.UI.Xaml.Data; 14 | using Windows.UI.Xaml.Input; 15 | using Windows.UI.Xaml.Media; 16 | using Windows.UI.Xaml.Media.Animation; 17 | using Windows.UI.Xaml.Navigation; 18 | 19 | namespace PullToRefresh 20 | { 21 | public sealed partial class App : Application 22 | { 23 | #if WINDOWS_PHONE_APP 24 | private TransitionCollection transitions; 25 | #endif 26 | 27 | public App() 28 | { 29 | this.InitializeComponent(); 30 | this.Suspending += this.OnSuspending; 31 | } 32 | 33 | protected override void OnLaunched(LaunchActivatedEventArgs e) 34 | { 35 | #if DEBUG 36 | if (System.Diagnostics.Debugger.IsAttached) 37 | { 38 | this.DebugSettings.EnableFrameRateCounter = false; 39 | } 40 | #endif 41 | 42 | Frame rootFrame = Window.Current.Content as Frame; 43 | 44 | if (rootFrame == null) 45 | { 46 | rootFrame = new Frame(); 47 | 48 | rootFrame.CacheSize = 1; 49 | 50 | if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) 51 | { 52 | } 53 | 54 | Window.Current.Content = rootFrame; 55 | } 56 | 57 | if (rootFrame.Content == null) 58 | { 59 | #if WINDOWS_PHONE_APP 60 | if (rootFrame.ContentTransitions != null) 61 | { 62 | this.transitions = new TransitionCollection(); 63 | foreach (var c in rootFrame.ContentTransitions) 64 | { 65 | this.transitions.Add(c); 66 | } 67 | } 68 | 69 | rootFrame.ContentTransitions = null; 70 | rootFrame.Navigated += this.RootFrame_FirstNavigated; 71 | #endif 72 | if (!rootFrame.Navigate(typeof(MainPage), e.Arguments)) 73 | { 74 | throw new Exception("Failed to create initial page"); 75 | } 76 | } 77 | 78 | Window.Current.Activate(); 79 | } 80 | 81 | #if WINDOWS_PHONE_APP 82 | private void RootFrame_FirstNavigated(object sender, NavigationEventArgs e) 83 | { 84 | var rootFrame = sender as Frame; 85 | rootFrame.ContentTransitions = this.transitions ?? new TransitionCollection() { new NavigationThemeTransition() }; 86 | rootFrame.Navigated -= this.RootFrame_FirstNavigated; 87 | } 88 | #endif 89 | private void OnSuspending(object sender, SuspendingEventArgs e) 90 | { 91 | var deferral = e.SuspendingOperation.GetDeferral(); 92 | 93 | deferral.Complete(); 94 | } 95 | } 96 | } -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.Shared/Controls/PullToRefreshScrollViewer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Runtime.InteropServices.WindowsRuntime; 6 | using System.Windows.Input; 7 | using Windows.Foundation; 8 | using Windows.UI; 9 | using Windows.UI.Popups; 10 | using Windows.UI.Xaml; 11 | using Windows.UI.Xaml.Controls; 12 | using Windows.UI.Xaml.Data; 13 | using Windows.UI.Xaml.Documents; 14 | using Windows.UI.Xaml.Input; 15 | using Windows.UI.Xaml.Media; 16 | 17 | namespace PullToRefresh.Controls 18 | { 19 | public sealed class PullToRefreshScrollViewer : ContentControl 20 | { 21 | private const string ScrollViewerControl = "ScrollViewer"; 22 | private const string ContainerGrid = "ContainerGrid"; 23 | private const string PullToRefreshIndicator = "PullToRefreshIndicator"; 24 | private const string VisualStateNormal = "Normal"; 25 | private const string VisualStateReadyToRefresh = "ReadyToRefresh"; 26 | 27 | private DispatcherTimer compressionTimer; 28 | private ScrollViewer scrollViewer; 29 | private DispatcherTimer timer; 30 | private Grid containerGrid; 31 | private Border pullToRefreshIndicator; 32 | private bool isCompressionTimerRunning; 33 | private bool isReadyToRefresh; 34 | private bool isCompressedEnough; 35 | 36 | public event EventHandler RefreshContent; 37 | 38 | public static readonly DependencyProperty PullTextProperty = DependencyProperty.Register("PullText", typeof(string), typeof(PullToRefreshScrollViewer), new PropertyMetadata("Pull to refresh")); 39 | public static readonly DependencyProperty RefreshTextProperty = DependencyProperty.Register("RefreshText", typeof(string), typeof(PullToRefreshScrollViewer), new PropertyMetadata("Release to refresh")); 40 | public static readonly DependencyProperty RefreshHeaderHeightProperty = DependencyProperty.Register("RefreshHeaderHeight", typeof(double), typeof(PullToRefreshScrollViewer), new PropertyMetadata(100D)); 41 | public static readonly DependencyProperty RefreshCommandProperty = DependencyProperty.Register("RefreshCommand", typeof(ICommand), typeof(PullToRefreshScrollViewer), new PropertyMetadata(null)); 42 | public static readonly DependencyProperty ArrowColorProperty = DependencyProperty.Register("ArrowColor", typeof(Brush), typeof(PullToRefreshScrollViewer), new PropertyMetadata(new SolidColorBrush(Colors.Red))); 43 | 44 | #if WINDOWS_PHONE_APP 45 | private double offsetTreshhold = 100; 46 | #endif 47 | #if WINDOWS_APP 48 | private double offsetTreshhold = 70; 49 | #endif 50 | 51 | public PullToRefreshScrollViewer() 52 | { 53 | this.DefaultStyleKey = typeof(PullToRefreshScrollViewer); 54 | Loaded += PullToRefreshScrollViewer_Loaded; 55 | } 56 | 57 | public ICommand RefreshCommand 58 | { 59 | get { return (ICommand)GetValue(RefreshCommandProperty); } 60 | set { SetValue(RefreshCommandProperty, value); } 61 | } 62 | 63 | public double RefreshHeaderHeight 64 | { 65 | get { return (double)GetValue(RefreshHeaderHeightProperty); } 66 | set { SetValue(RefreshHeaderHeightProperty, value); } 67 | } 68 | 69 | public string RefreshText 70 | { 71 | get { return (string)GetValue(RefreshTextProperty); } 72 | set { SetValue(RefreshTextProperty, value); } 73 | } 74 | 75 | public string PullText 76 | { 77 | get { return (string)GetValue(PullTextProperty); } 78 | set { SetValue(PullTextProperty, value); } 79 | } 80 | 81 | public Brush ArrowColor 82 | { 83 | get { return (Brush)GetValue(ArrowColorProperty); } 84 | set { SetValue(ArrowColorProperty, value); } 85 | } 86 | 87 | protected override void OnApplyTemplate() 88 | { 89 | base.OnApplyTemplate(); 90 | scrollViewer = (ScrollViewer)GetTemplateChild(ScrollViewerControl); 91 | scrollViewer.ViewChanging += ScrollViewer_ViewChanging; 92 | scrollViewer.Margin = new Thickness(0, 0, 0, -RefreshHeaderHeight); 93 | var transform = new CompositeTransform(); 94 | transform.TranslateY = -RefreshHeaderHeight; 95 | scrollViewer.RenderTransform = transform; 96 | 97 | containerGrid = (Grid)GetTemplateChild(ContainerGrid); 98 | pullToRefreshIndicator = (Border)GetTemplateChild(PullToRefreshIndicator); 99 | SizeChanged += OnSizeChanged; 100 | } 101 | 102 | /// 103 | /// Initiate timers to detect if we're scrolling into negative space 104 | /// 105 | /// 106 | /// 107 | private void PullToRefreshScrollViewer_Loaded(object sender, RoutedEventArgs e) 108 | { 109 | timer = new DispatcherTimer(); 110 | timer.Interval = TimeSpan.FromMilliseconds(100); 111 | timer.Tick += Timer_Tick; 112 | 113 | compressionTimer = new DispatcherTimer(); 114 | compressionTimer.Interval = TimeSpan.FromSeconds(1); 115 | compressionTimer.Tick += CompressionTimer_Tick; 116 | 117 | timer.Start(); 118 | } 119 | 120 | /// 121 | /// Clip the bounds of the control to avoid showing the pull to refresh text 122 | /// 123 | /// 124 | /// 125 | private void OnSizeChanged(object sender, SizeChangedEventArgs e) 126 | { 127 | Clip = new RectangleGeometry() 128 | { 129 | Rect = new Rect(0, 0, e.NewSize.Width, e.NewSize.Height) 130 | }; 131 | } 132 | 133 | /// 134 | /// Detect if we've scrolled all the way to the top. Stop timers when we're not completely in the top 135 | /// 136 | /// 137 | /// 138 | private void ScrollViewer_ViewChanging(object sender, ScrollViewerViewChangingEventArgs e) 139 | { 140 | if (e.NextView.VerticalOffset == 0) 141 | { 142 | timer.Start(); 143 | } 144 | else 145 | { 146 | if (timer != null) 147 | { 148 | timer.Stop(); 149 | } 150 | 151 | if (compressionTimer != null) 152 | { 153 | compressionTimer.Stop(); 154 | } 155 | 156 | isCompressionTimerRunning = false; 157 | isCompressedEnough = false; 158 | isReadyToRefresh = false; 159 | 160 | VisualStateManager.GoToState(this, VisualStateNormal, true); 161 | } 162 | } 163 | 164 | /// 165 | /// Detect if I've scrolled far enough and been there for enough time to refresh 166 | /// 167 | /// 168 | /// 169 | private void CompressionTimer_Tick(object sender, object e) 170 | { 171 | if (isCompressedEnough) 172 | { 173 | VisualStateManager.GoToState(this, VisualStateReadyToRefresh, true); 174 | isReadyToRefresh = true; 175 | } 176 | else 177 | { 178 | isCompressedEnough = false; 179 | compressionTimer.Stop(); 180 | } 181 | } 182 | 183 | /// 184 | /// Invoke timer if we've scrolled far enough up into negative space. If we get back to offset 0 the refresh command and event is invoked. 185 | /// 186 | /// 187 | /// 188 | private void Timer_Tick(object sender, object e) 189 | { 190 | if (containerGrid != null) 191 | { 192 | Rect elementBounds = pullToRefreshIndicator.TransformToVisual(containerGrid).TransformBounds(new Rect(0.0, 0.0, pullToRefreshIndicator.Height, RefreshHeaderHeight)); 193 | var compressionOffset = elementBounds.Bottom; 194 | Debug.WriteLine(compressionOffset); 195 | 196 | if (compressionOffset > offsetTreshhold) 197 | { 198 | if (isCompressionTimerRunning == false) 199 | { 200 | isCompressionTimerRunning = true; 201 | compressionTimer.Start(); 202 | } 203 | 204 | isCompressedEnough = true; 205 | } 206 | else if (compressionOffset == 0 && isReadyToRefresh == true) 207 | { 208 | InvokeRefresh(); 209 | } 210 | else 211 | { 212 | isCompressedEnough = false; 213 | isCompressionTimerRunning = false; 214 | } 215 | } 216 | } 217 | 218 | /// 219 | /// Set correct visual state and invoke refresh event and command 220 | /// 221 | private void InvokeRefresh() 222 | { 223 | isReadyToRefresh = false; 224 | VisualStateManager.GoToState(this, VisualStateNormal, true); 225 | 226 | if (RefreshContent != null) 227 | { 228 | RefreshContent(this, EventArgs.Empty); 229 | } 230 | 231 | if (RefreshCommand != null && RefreshCommand.CanExecute(null) == true) 232 | { 233 | RefreshCommand.Execute(null); 234 | } 235 | } 236 | } 237 | } 238 | -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.Shared/Images/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deanihansen/Pull-to-refresh-Scrollviewer-WinRT/3166090b609976cc2cb4ff06ad66bebd86f97f11/PullToRefresh/PullToRefresh/PullToRefresh.Shared/Images/1.jpg -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.Shared/Images/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deanihansen/Pull-to-refresh-Scrollviewer-WinRT/3166090b609976cc2cb4ff06ad66bebd86f97f11/PullToRefresh/PullToRefresh/PullToRefresh.Shared/Images/2.jpg -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.Shared/Images/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deanihansen/Pull-to-refresh-Scrollviewer-WinRT/3166090b609976cc2cb4ff06ad66bebd86f97f11/PullToRefresh/PullToRefresh/PullToRefresh.Shared/Images/3.jpg -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.Shared/Images/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deanihansen/Pull-to-refresh-Scrollviewer-WinRT/3166090b609976cc2cb4ff06ad66bebd86f97f11/PullToRefresh/PullToRefresh/PullToRefresh.Shared/Images/4.jpg -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.Shared/MainPage.xaml: -------------------------------------------------------------------------------- 1 |  12 | 15 | 16 | 18 | 20 | 21 | 24 | 29 | 37 | 38 | 45 | 47 | 48 | 49 | 54 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.Shared/MainPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Diagnostics; 5 | using System.IO; 6 | using System.Linq; 7 | using System.Runtime.InteropServices.WindowsRuntime; 8 | using Windows.Foundation; 9 | using Windows.Foundation.Collections; 10 | using Windows.UI.Popups; 11 | using Windows.UI.Xaml; 12 | using Windows.UI.Xaml.Controls; 13 | using Windows.UI.Xaml.Controls.Primitives; 14 | using Windows.UI.Xaml.Data; 15 | using Windows.UI.Xaml.Input; 16 | using Windows.UI.Xaml.Media; 17 | using Windows.UI.Xaml.Navigation; 18 | 19 | 20 | namespace PullToRefresh 21 | { 22 | public sealed partial class MainPage : Page 23 | { 24 | public MainPage() 25 | { 26 | this.InitializeComponent(); 27 | } 28 | 29 | private void PullToRefreshScrollViewer_RefreshContent(object sender, EventArgs e) 30 | { 31 | MessageDialog dialog = new MessageDialog("WE FUCKING DID IT!"); 32 | dialog.ShowAsync(); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.Shared/PullToRefresh.Shared.projitems: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | true 6 | a5cf64fa-0711-4dd6-af22-0b65c7dafd4b 7 | 8 | 9 | PullToRefresh 10 | 11 | 12 | 13 | Designer 14 | 15 | 16 | App.xaml 17 | 18 | 19 | 20 | MainPage.xaml 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | Designer 34 | MSBuild:Compile 35 | 36 | 37 | Designer 38 | 39 | 40 | -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.Shared/PullToRefresh.Shared.shproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | a5cf64fa-0711-4dd6-af22-0b65c7dafd4b 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.Shared/Themes/Generic.xaml: -------------------------------------------------------------------------------- 1 | 9 | 142 | 143 | -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.Shared/ViewModel/MainViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | using GalaSoft.MvvmLight; 3 | using GalaSoft.MvvmLight.Command; 4 | using System.Collections.ObjectModel; 5 | using System; 6 | using System.Threading.Tasks; 7 | 8 | namespace PullToRefresh.ViewModel 9 | { 10 | public class MainViewModel : ViewModelBase 11 | { 12 | private RelayCommand refreshCommand; 13 | 14 | public MainViewModel() 15 | { 16 | LoadItems(); 17 | } 18 | 19 | private void LoadItems() 20 | { 21 | Images.Add("ms-appx:///Images/1.jpg"); 22 | Images.Add("ms-appx:///Images/2.jpg"); 23 | Images.Add("ms-appx:///Images/3.jpg"); 24 | Images.Add("ms-appx:///Images/4.jpg"); 25 | Images.Add("ms-appx:///Images/1.jpg"); 26 | Images.Add("ms-appx:///Images/2.jpg"); 27 | Images.Add("ms-appx:///Images/3.jpg"); 28 | Images.Add("ms-appx:///Images/4.jpg"); 29 | } 30 | 31 | public const string ImagesPropertyName = "Images"; 32 | 33 | private ObservableCollection images = new ObservableCollection(); 34 | 35 | /// 36 | /// Sets and gets the Images property. 37 | /// Changes to that property's value raise the PropertyChanged event. 38 | /// 39 | public ObservableCollection Images 40 | { 41 | get 42 | { 43 | return images; 44 | } 45 | 46 | set 47 | { 48 | if (images == value) 49 | { 50 | return; 51 | } 52 | 53 | images = value; 54 | RaisePropertyChanged(ImagesPropertyName); 55 | } 56 | } 57 | 58 | /// 59 | /// The property's name. 60 | /// 61 | public const string IsLoadingPropertyName = "IsLoading"; 62 | 63 | private bool isLoading = false; 64 | 65 | /// 66 | /// Sets and gets the IsLoading property. 67 | /// Changes to that property's value raise the PropertyChanged event. 68 | /// 69 | public bool IsLoading 70 | { 71 | get 72 | { 73 | return isLoading; 74 | } 75 | 76 | set 77 | { 78 | if (isLoading == value) 79 | { 80 | return; 81 | } 82 | 83 | isLoading = value; 84 | RaisePropertyChanged(IsLoadingPropertyName); 85 | } 86 | } 87 | 88 | public RelayCommand RefreshCommand 89 | { 90 | get 91 | { 92 | return refreshCommand 93 | ?? (refreshCommand = new RelayCommand(RefreshItems)); 94 | } 95 | } 96 | 97 | private async void RefreshItems() 98 | { 99 | IsLoading = true; 100 | Images.Clear(); 101 | await Task.Delay(2000); 102 | LoadItems(); 103 | 104 | IsLoading = false; 105 | } 106 | } 107 | } -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.Shared/ViewModel/ViewModelLocator.cs: -------------------------------------------------------------------------------- 1 | /* 2 | In App.xaml: 3 | 4 | 6 | 7 | 8 | In the View: 9 | DataContext="{Binding Source={StaticResource Locator}, Path=ViewModelName}" 10 | 11 | You can also use Blend to do all this with the tool's support. 12 | See http://www.galasoft.ch/mvvm 13 | */ 14 | 15 | using GalaSoft.MvvmLight; 16 | using GalaSoft.MvvmLight.Ioc; 17 | using Microsoft.Practices.ServiceLocation; 18 | 19 | namespace PullToRefresh.ViewModel 20 | { 21 | /// 22 | /// This class contains static references to all the view models in the 23 | /// application and provides an entry point for the bindings. 24 | /// 25 | public class ViewModelLocator 26 | { 27 | /// 28 | /// Initializes a new instance of the ViewModelLocator class. 29 | /// 30 | public ViewModelLocator() 31 | { 32 | ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default); 33 | 34 | ////if (ViewModelBase.IsInDesignModeStatic) 35 | ////{ 36 | //// // Create design time view services and models 37 | //// SimpleIoc.Default.Register(); 38 | ////} 39 | ////else 40 | ////{ 41 | //// // Create run time view services and models 42 | //// SimpleIoc.Default.Register(); 43 | ////} 44 | 45 | SimpleIoc.Default.Register(); 46 | } 47 | 48 | public MainViewModel Main 49 | { 50 | get 51 | { 52 | return ServiceLocator.Current.GetInstance(); 53 | } 54 | } 55 | 56 | public static void Cleanup() 57 | { 58 | // TODO Clear the ViewModels 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.Windows/Assets/Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deanihansen/Pull-to-refresh-Scrollviewer-WinRT/3166090b609976cc2cb4ff06ad66bebd86f97f11/PullToRefresh/PullToRefresh/PullToRefresh.Windows/Assets/Logo.scale-100.png -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.Windows/Assets/SmallLogo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deanihansen/Pull-to-refresh-Scrollviewer-WinRT/3166090b609976cc2cb4ff06ad66bebd86f97f11/PullToRefresh/PullToRefresh/PullToRefresh.Windows/Assets/SmallLogo.scale-100.png -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.Windows/Assets/SplashScreen.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deanihansen/Pull-to-refresh-Scrollviewer-WinRT/3166090b609976cc2cb4ff06ad66bebd86f97f11/PullToRefresh/PullToRefresh/PullToRefresh.Windows/Assets/SplashScreen.scale-100.png -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.Windows/Assets/StoreLogo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deanihansen/Pull-to-refresh-Scrollviewer-WinRT/3166090b609976cc2cb4ff06ad66bebd86f97f11/PullToRefresh/PullToRefresh/PullToRefresh.Windows/Assets/StoreLogo.scale-100.png -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.Windows/Package.appxmanifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 7 | 8 | 9 | PullToRefresh.Windows 10 | Deani 11 | Assets\StoreLogo.png 12 | 13 | 14 | 15 | 6.3.0 16 | 6.3.0 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.Windows/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("PullToRefresh.Windows")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("PullToRefresh.Windows")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("1.0.0.0")] 28 | [assembly: AssemblyFileVersion("1.0.0.0")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.Windows/PullToRefresh.Windows.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {FF56FBE8-7E4C-4347-9AFF-91076B53722D} 8 | AppContainerExe 9 | Properties 10 | PullToRefresh 11 | PullToRefresh.Windows 12 | en-US 13 | 8.1 14 | 12 15 | 512 16 | true 17 | {BC8A1FFA-BEE3-4634-8014-F334798102B3};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 18 | PullToRefresh.Windows_TemporaryKey.pfx 19 | ..\..\ 20 | true 21 | 22 | 23 | AnyCPU 24 | true 25 | full 26 | false 27 | bin\Debug\ 28 | DEBUG;TRACE;NETFX_CORE;WINDOWS_APP 29 | prompt 30 | 4 31 | 32 | 33 | AnyCPU 34 | pdbonly 35 | true 36 | bin\Release\ 37 | TRACE;NETFX_CORE;WINDOWS_APP 38 | prompt 39 | 4 40 | 41 | 42 | true 43 | bin\ARM\Debug\ 44 | DEBUG;TRACE;NETFX_CORE;WINDOWS_APP 45 | ;2008 46 | full 47 | ARM 48 | false 49 | prompt 50 | true 51 | 52 | 53 | bin\ARM\Release\ 54 | TRACE;NETFX_CORE;WINDOWS_APP 55 | true 56 | ;2008 57 | pdbonly 58 | ARM 59 | false 60 | prompt 61 | true 62 | 63 | 64 | true 65 | bin\x64\Debug\ 66 | DEBUG;TRACE;NETFX_CORE;WINDOWS_APP 67 | ;2008 68 | full 69 | x64 70 | false 71 | prompt 72 | true 73 | 74 | 75 | bin\x64\Release\ 76 | TRACE;NETFX_CORE;WINDOWS_APP 77 | true 78 | ;2008 79 | pdbonly 80 | x64 81 | false 82 | prompt 83 | true 84 | 85 | 86 | true 87 | bin\x86\Debug\ 88 | DEBUG;TRACE;NETFX_CORE;WINDOWS_APP 89 | ;2008 90 | full 91 | x86 92 | false 93 | prompt 94 | true 95 | 96 | 97 | bin\x86\Release\ 98 | TRACE;NETFX_CORE;WINDOWS_APP 99 | true 100 | ;2008 101 | pdbonly 102 | x86 103 | false 104 | prompt 105 | true 106 | 107 | 108 | 109 | 110 | 111 | 112 | Designer 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | ..\..\packages\MvvmLightLibs.5.1.1.0\lib\windows81\GalaSoft.MvvmLight.dll 126 | True 127 | 128 | 129 | ..\..\packages\MvvmLightLibs.5.1.1.0\lib\windows81\GalaSoft.MvvmLight.Extras.dll 130 | True 131 | 132 | 133 | ..\..\packages\MvvmLightLibs.5.1.1.0\lib\windows81\GalaSoft.MvvmLight.Platform.dll 134 | True 135 | 136 | 137 | ..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll 138 | True 139 | 140 | 141 | 142 | 12.0 143 | 144 | 145 | 146 | 147 | 148 | 149 | This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. 150 | 151 | 152 | 153 | 160 | -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.Windows/PullToRefresh.Windows_TemporaryKey.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deanihansen/Pull-to-refresh-Scrollviewer-WinRT/3166090b609976cc2cb4ff06ad66bebd86f97f11/PullToRefresh/PullToRefresh/PullToRefresh.Windows/PullToRefresh.Windows_TemporaryKey.pfx -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.Windows/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.WindowsPhone/Assets/Logo.scale-240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deanihansen/Pull-to-refresh-Scrollviewer-WinRT/3166090b609976cc2cb4ff06ad66bebd86f97f11/PullToRefresh/PullToRefresh/PullToRefresh.WindowsPhone/Assets/Logo.scale-240.png -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.WindowsPhone/Assets/SmallLogo.scale-240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deanihansen/Pull-to-refresh-Scrollviewer-WinRT/3166090b609976cc2cb4ff06ad66bebd86f97f11/PullToRefresh/PullToRefresh/PullToRefresh.WindowsPhone/Assets/SmallLogo.scale-240.png -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.WindowsPhone/Assets/SplashScreen.scale-240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deanihansen/Pull-to-refresh-Scrollviewer-WinRT/3166090b609976cc2cb4ff06ad66bebd86f97f11/PullToRefresh/PullToRefresh/PullToRefresh.WindowsPhone/Assets/SplashScreen.scale-240.png -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.WindowsPhone/Assets/Square71x71Logo.scale-240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deanihansen/Pull-to-refresh-Scrollviewer-WinRT/3166090b609976cc2cb4ff06ad66bebd86f97f11/PullToRefresh/PullToRefresh/PullToRefresh.WindowsPhone/Assets/Square71x71Logo.scale-240.png -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.WindowsPhone/Assets/StoreLogo.scale-240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deanihansen/Pull-to-refresh-Scrollviewer-WinRT/3166090b609976cc2cb4ff06ad66bebd86f97f11/PullToRefresh/PullToRefresh/PullToRefresh.WindowsPhone/Assets/StoreLogo.scale-240.png -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.WindowsPhone/Assets/WideLogo.scale-240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deanihansen/Pull-to-refresh-Scrollviewer-WinRT/3166090b609976cc2cb4ff06ad66bebd86f97f11/PullToRefresh/PullToRefresh/PullToRefresh.WindowsPhone/Assets/WideLogo.scale-240.png -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.WindowsPhone/Package.appxmanifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 7 | 8 | 9 | 10 | 11 | PullToRefresh.WindowsPhone 12 | Deani 13 | Assets\StoreLogo.png 14 | 15 | 16 | 17 | 6.3.1 18 | 6.3.1 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 29 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.WindowsPhone/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("PullToRefresh.WindowsPhone")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("PullToRefresh.WindowsPhone")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("1.0.0.0")] 28 | [assembly: AssemblyFileVersion("1.0.0.0")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.WindowsPhone/PullToRefresh.WindowsPhone.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {94A3EFD3-29A1-4B16-883D-BA50E0229C10} 8 | AppContainerExe 9 | Properties 10 | PullToRefresh 11 | PullToRefresh.WindowsPhone 12 | en-US 13 | 8.1 14 | 12 15 | 512 16 | {76F1466A-8B6D-4E39-A767-685A06062A39};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 17 | true 18 | ..\..\ 19 | true 20 | 21 | 22 | AnyCPU 23 | true 24 | full 25 | false 26 | bin\Debug\ 27 | DEBUG;TRACE;NETFX_CORE;WINDOWS_PHONE_APP 28 | prompt 29 | 4 30 | 31 | 32 | AnyCPU 33 | pdbonly 34 | true 35 | bin\Release\ 36 | TRACE;NETFX_CORE;WINDOWS_PHONE_APP 37 | prompt 38 | 4 39 | 40 | 41 | true 42 | bin\ARM\Debug\ 43 | DEBUG;TRACE;NETFX_CORE;WINDOWS_PHONE_APP 44 | ;2008 45 | full 46 | ARM 47 | false 48 | prompt 49 | true 50 | 51 | 52 | bin\ARM\Release\ 53 | TRACE;NETFX_CORE;WINDOWS_PHONE_APP 54 | true 55 | ;2008 56 | pdbonly 57 | ARM 58 | false 59 | prompt 60 | true 61 | 62 | 63 | true 64 | bin\x86\Debug\ 65 | DEBUG;TRACE;NETFX_CORE;WINDOWS_PHONE_APP 66 | ;2008 67 | full 68 | x86 69 | false 70 | prompt 71 | true 72 | 73 | 74 | bin\x86\Release\ 75 | TRACE;NETFX_CORE;WINDOWS_PHONE_APP 76 | true 77 | ;2008 78 | pdbonly 79 | x86 80 | false 81 | prompt 82 | true 83 | 84 | 85 | 86 | 87 | 88 | 89 | Designer 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | ..\..\packages\MvvmLightLibs.5.1.1.0\lib\wpa81\GalaSoft.MvvmLight.dll 103 | True 104 | 105 | 106 | ..\..\packages\MvvmLightLibs.5.1.1.0\lib\wpa81\GalaSoft.MvvmLight.Extras.dll 107 | True 108 | 109 | 110 | ..\..\packages\MvvmLightLibs.5.1.1.0\lib\wpa81\GalaSoft.MvvmLight.Platform.dll 111 | True 112 | 113 | 114 | ..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll 115 | True 116 | 117 | 118 | 119 | 120 | 121 | 122 | 12.0 123 | 124 | 125 | WindowsPhoneApp 126 | 127 | 128 | 129 | 130 | 131 | 132 | This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. 133 | 134 | 135 | 136 | 143 | -------------------------------------------------------------------------------- /PullToRefresh/PullToRefresh/PullToRefresh.WindowsPhone/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | --------------------------------------------------------------------------------