Posts

SQLite Queries Xamarin.Forms

public class LocalDB     {         private SQLiteConnection _sqlconnection;         bool returnvalue;         public LocalDB()         {             //Getting conection and Creating table              _sqlconnection = DependencyService.Get<ISQLite>().GetConnection();             _sqlconnection.CreateTable<SampleModel>();         }         //Get all         public IEnumerable<SampleModel> GetAllLocation()         {             return (from t in ...
Native2Forms Call Method   (App)App.Current).MethodName();

Search Items in Listview using List and Observable Collection

 Search Items in Listview using  Observable Collection    SkillListItemSource = TempSkillListItemSource;                 List<Skill> Suggetions = SkillListItemSource.Where(c => c.Title.ToLower().Contains(searchtext.ToLower())).ToList();                 SkillListItemSource = new ObservableCollection<Skill>(Suggetions);                 IsVisibleSearchbarCancelButton = true;  Search Items in Listview using List       CommonList = TempList;           var searchresults = CommonList.FindAll((obj) => obj.Name.ToLower().Contains(searchtext.ToLower()));                 ...

Xamarin Master Details Page

How to Set Master Details Page in Xamarin Forms ----------------------------------------------------------------------- Add 3 File in New Folder in Soultion 1.RootPage 2.SideMenuListview 3.SideMenu 1.RootPage ---------------------- public class RootPage : Xamarin.Forms.MasterDetailPage     {         public RootPage ()         {             var menuPage = new MenuPage ();             menuPage.Menu.ItemSelected += (sender, e) => NavigateTo (e.SelectedItem as MenuItem);             Master = menuPage;             Detail = new NavigationPage (new ContractsPage ());         }         void NavigateTo (MenuItem menu)         {...

Interfacing SQLite Both Android & iOS

 Install Package SQLite.Net-PCL 3.1.1 In PCL ------------------------------  public interface ISQLite     {         SQLiteConnection GetConnection();     } ------------------------------------- In Xamarin.Android ------------------------------------- [assembly:Xamarin.Forms.Dependency(typeof(LocationPOC.Droid.Implementations.SqlLiteAndroid))] namespace {     class SqlLiteAndroid : ISQLite     {         public SQLiteConnection GetConnection()         {             var filename = "Locations.db3";             var documentspath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);             var path = Pa...

SQLite Queries for Xamarin.Forms

  public class LocalDB     {         private SQLiteConnection _sqlconnection;         public LocalDB()         {             //Getting conection and Creating table              _sqlconnection = DependencyService.Get<ISQLite>().GetConnection();             _sqlconnection.CreateTable<LocationModel>();         }         //Get all         public IEnumerable<LocationModel> GetAllLocation()         {             return (from t in _sqlconnection.Table<LocationModel>() select t).ToList(); ...

Set iOS Path Location from Xamarin Dependancy Service

    var documents = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);             var directoryname = Path.Combine(documents, "myfolder");             Directory.CreateDirectory(directoryname);             var FilePath = Path.Combine(directoryname, fileName);