Skip to content

Instantly share code, notes, and snippets.

View damirarh's full-sized avatar

Damir Arh damirarh

View GitHub Profile
<ListView IsItemClickEnabled="True"
ItemsSource="{Binding Items}"
ItemClick="OnItemClick" />
var listToModify = new List<string>();
var listNotToModify = new List<string>();
var bindingListWrapper = new BindingList<string>(listToModify); // wrapper modifies inner list
var bindingListCopy = new BindingList<string>(listNotToModify.ToList()); // doesn't change original list
var array = new string[] { };
Assert.IsTrue(((IList<string>)array).IsReadOnly);
Assert.IsFalse(((IList)array).IsReadOnly);
var array = new string[] { };
var bindingList = new BindingList<string>(array);
bindingList.Add("test");
public static void PostAndNavigate(this WebView webView, string requestUri, IEnumerable<KeyValuePair<string, string>> formFields)
{
var formElements = String.Join("",
formFields.Select(p => String.Format(@"<input type=""hidden"" value=""{0}"" name=""{1}"">", p.Value, p.Key)));
var html = String.Format(
@"<html>
<head>
<script type=""text/javascript"">
function Submit()
{{
MyWebView.Navigate(new Uri(getRequest));
MyWebView.NavigateToString(postResult);
var http = new HttpClient();
// GET request
var getRequest = "http://hroch486.icpf.cas.cz/cgi-bin/echo.pl?key=value";
var getResponse = await http.GetAsync(getRequest);
var getResult = await getResponse.Content.ReadAsStringAsync();
// POST request
var postUri = new Uri("http://hroch486.icpf.cas.cz/cgi-bin/echo.pl");
var postFields = new Dictionary<string, string>
{
{ "key", "value" }
<!-- Line before the change -->
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<!-- Line after the change (relative path must match your .nuget folder location after the move) -->
<Import Project="..\..\.nuget\NuGet.targets" Condition="Exists('..\..\.nuget\NuGet.targets')" />
<!-- Line before the change -->
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\NuGet.exe</NuGetExePath>
<!-- Line after the change -->
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(MSBuildThisFileDirectory)\NuGet.exe</NuGetExePath>