This file contains 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.Generic; | |
using System.Windows; | |
using System.Windows.Controls; | |
using Microsoft.Phone.Controls; | |
namespace ExtendedControls | |
{ | |
public class ExtendedSelector : LongListSelector | |
{ | |
public static readonly DependencyProperty SelectedItemProperty = |
This file contains 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; | |
using System.Collections.Generic; | |
using System.Collections.Specialized; | |
using System.Windows; | |
using System.Windows.Controls; | |
using Microsoft.Phone.Controls; | |
namespace LongListSelectorAdd | |
{ | |
public class ExtendedSelector : LongListSelector |
This file contains 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; | |
using System.Collections; | |
using System.Collections.Specialized; | |
using System.Linq; | |
using Xamarin.Forms; | |
namespace WrapPanelDemo.Controls | |
{ | |
public class AwesomeWrappanel : Layout<View> | |
{ |
This file contains 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 (var client = new HttpClient()) | |
{ | |
var result = await client.GetAsync(Constants.ApiCallUrl); | |
} |
This file contains 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 RestClient | |
{ | |
private static HttpClient _client; | |
public static HttpClient GetClientInstance() | |
{ | |
if (_client == null) | |
_client = new HttpClient(); | |
return _client; |
This file contains 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
private async Task FetchData() | |
{ | |
var result = await RestClient.GetClientInstance().GetAsync(Constants.ApiCallUrl); | |
} |
This file contains 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 RestClient | |
{ | |
private static HttpClient _client; | |
public static HttpClient GetClientInstance() | |
{ | |
if (_client == null) | |
_client = new HttpClient | |
{ | |
BaseAddress = new Uri(Constants.ApiBaseUrl) |
This file contains 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 HttpClient GetClientInstance() | |
{ | |
if (_client == null) | |
{ | |
var handler = new HttpClientHandler(); | |
if (handler.SupportsAutomaticDecompression) | |
{ | |
handler.AutomaticDecompression = DecompressionMethods.GZip | | |
DecompressionMethods.Deflate; | |
} |
This file contains 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
_client = new HttpClient(handler) | |
{ | |
BaseAddress = new Uri(Constants.ApiBaseUrl) | |
}; | |
_client.DefaultRequestHeaders.Clear(); | |
_client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", UserInstance.AccessToken); |
This file contains 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
private async Task FetchData() | |
{ | |
var service = new ResourcesService(); | |
var result = await service.FetchAllResources(); | |
//textblock is bound against Json | |
Json = result | |
} | |
public class ResourcesService |
OlderNewer