.net

Xamarin forms navigation

I am having trouble with Xamarin forms navigation, as in, it does not work at all. My code : appname.cs using System; using Xamarin.Forms; namespace List { public class App : Application { public App () { MainPage = new NavigationPage (new HomePage ()); } } } homepage.xaml.cs using System; using Xamarin.Forms; using System.ComponentModel; using System.Globalization; namespace List { public…
Read more

Replace element on a List of object retrived as property / public field

I’m trying to do simple thing – replace object on a list with another one, ‘more up to date’. The problem is the actual list is not getting updated. List is defined and stored in my ‘DataProvider’ class: public class CountriesDataSet { List<Country> b; private IXmlBinder xmlBinder; public CountriesDataSet() { xmlBinder = new BasicXmlLoader(); Countries = xmlBinder.Load(); } public List<Country>…
Read more

Grouping the details of the data into one, price field should be separated by semi-colon

I have this requirement that need to group the data into OrderNum, the price needs to be consolidated in one row separated by semi-colon, this was determined by Type. I can do this by Iterating the results but, probably there’s a better way to do it especially in LINQ. var notebooks = new List<NoteBook> { new NoteBook { Type =…
Read more

T4 templates: any way to make ToStringWithCulture() convert null to string.Empty instead of throwing exception?

When I provide an object to a T4 template with nullable properties, unless I explicitly write <#= obj.Property ?? string.Empty #> the ToStringWithCulture(object objectToConvert) method that is generated for the template throws an ArgumentNullException. Is there any neat or elegant way to override this behavior so that I don’t have to pepper null coalescing all over my templates? Source:…
Read more