Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6823549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:47:45+00:00 2026-05-26T21:47:45+00:00

I am working at Windows Phone 7 C#, XAML, XML and LINQ programming. I

  • 0

I am working at Windows Phone 7 C#, XAML, XML and LINQ programming. I need to organize search by part of the name at following XML:

<Row>
  <Myday>23</Myday>
  <Mymonth>12</Mymonth>
  <Mynames>Alex, Joanna, Jim</Mynames>
</Row>

<Row>
  <Myday>24</Myday>
  <Mymonth>12</Mymonth>
  <Mynames>John, David</Mynames>
</Row>

I have following query:

var myData = from query in loadedData.Descendants("Row")
             where query.Element("Mynames").Value.Contains("Jo")
             select new Kalendars
                        {
                            Myday = (int)query.Element("Myday"),
                            Mymonth = (int)query.Element("Mymonth"),
                            Mynames = (string)query.Element("Mynames")
                        };
             listBoxSearch.ItemsSource = myData;

Query problem is, that it will return full part of the names like “Alex, Joanna, Jim” and “John, David”. How can I get only Joanna and John? Second question is how it is possible to do that user enters ...Value.Contains("jo") and query still returns Joanna and John?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T21:47:45+00:00Added an answer on May 26, 2026 at 9:47 pm

    You’ll need to break apart that string to get the individual names. In this case, something like this will be fine.

    string line = "Alex, Joanna, Jim";
    string[] names = line.Split(new[] { ", " }, StringSplitOptions.None);
    var jos = from name in names
              where name.Contains("Jo")
              select name; // ["Joanna"]
    

    Just work this into your query.

    The original string contains the letters "Jo" so calling that function returns true. It doesn’t look at each of the words individually, just the string as a whole.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a windows phone project where I have some xml files with
I'm working on a Windows Phone app and am having the following problem. I
We're working on a Windows Phone 7 prototype application and we need a Graphing/Charting
I'm working on Windows phone client for one service with Oauth1 API. In API
I am working on a Windows Phone 7 app and I want to give
I am working on an app on Windows Phone and trying to get data
I m working on windows form application. I need to show amount in words
I have been working fine with MVVM Light on a silverlight 4 Windows Phone
I'm working on a Windows Phone application that displays an audioStream (as radio) but
Working with a listbox in windows phone 7 I am trying to make an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.