How to display result of searchbar list in another xaml

ma12rkyma12rky Member ✭✭✭

Hi @ColeX

May I ask if it can be done I want to display the search result of searchbar to another xaml page without using filtering of words(listview)

Thanks

Best Answers

Answers

  • ColeXColeX Member, Xamarin Team Xamurai

    You mean search in Page1 , show the result with listview in page 2 ?

  • ma12rkyma12rky Member ✭✭✭

    @ColeX yes

  • ma12rkyma12rky Member ✭✭✭

    @ColeX

    here is the diagram for clear explanation

  • ma12rkyma12rky Member ✭✭✭
    @Colex ok gonna try it tomorrow :)
  • ma12rkyma12rky Member ✭✭✭
    edited June 15

    @ColeX

    can I change that

    public static List<string> CreateData()
        {
            return new List<string> { "a", "abc", "b" };
        }
    

    into what my Model have? I mean can I use this?

    tmpdata = new List<HouseProperty>
               {
                    new HouseProperty(){ HouseName = "House num 1", Description = "This description is for house number 1"},
                    new HouseProperty(){ HouseName = "House num 2", Description = "This description is for house number 2"}
                };
    

    because I have a Model with the following parameters HouseName, Description

  • ma12rkyma12rky Member ✭✭✭

    @ColeX here is my Model that was inside my page 1 codebehind

    public List tmpdata;

    tmpdata = new List
    {
    new HouseProperty(){ HouseName = "House num 1", Description = "This description is for house number 1"},
    new HouseProperty(){ HouseName = "House num 2", Description = "This description is for house number 2"}
    };

  • ma12rkyma12rky Member ✭✭✭

    @ColeX your code works now I want to incorporate my data from my model in to your code instead of that return new List { "a", "abc", "b" }; :)

Sign In or Register to comment.