Windows Phone 8.1 How to search combobox list?

I have a combobox list created by binding to an ObservableCollection<> read from a JSON file. The
ObservableCollection <T> source has two strings and I want to find the object within the combobox list that
matches the value of one of the strings.  I can do this using foreach but I wanted to know if there was a way e.g.  combobox.items.where(x => x.ItemId == "4").  This example returns an error so does that mean that combobox in 8.1
does not support .where and .select, etc. for searching ?

Hi,
Have a look at the below sample code 
var filter = Data.Where(dataItem => dataItem.ItemID.Equals("123"));
From your above error message, it says the property "ItemID" is not referred in a proper way.
For that to work, Your DataModel should be 
public class DataModel
private ObservableCollection<DataItem> Data { get; set; }
public DataModel()
Data=new ObservableCollection<DataItem>();
public class DataItem
public string ItemID { get; set; }
Pradeep AJ

Similar Messages

  • Windows Phone app not showing in Search

    Hi, I have published successfuly app on Windows Store (status = published). Using search, app is never listed unless I use exact app name when doing search. Why is it not shown in search results - I specified correct keywords, but still search does not
    list it. App description can be accessed through URL or by directly typing full app name
    [email protected]

    Same problem here.
    Waited for 48 hrs, and I can find my app by full name. But I can't find it by any of 5 keywords I've provided during app submission process.
    Is it only matter of time? Should I wait for another day-two-...-week?.. Is there anything I can/must do?

  • Visual studio 2013 update 2 windows 8 windows phone 8 app

    hi
    i am using
    Windows 8.1 Enterprise 64 bit os
    Visual studio 2013 Update 2
    I want know how to create Windows 8 app and Windows phone 8 app how to create , its showing only 8.1 templates
    please Help Me someone

    Hello,
    Welcome to MSDN forum.
    I am afraid that the issue is out of support range of VS General Question forum which mainly discusses
    the usage of Visual Studio IDE such as WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
    and Visual Studio Editor.
    As far as I know, in order to develop windows phone 8 app, you need to install Windows Phone 8.0 SDK. If no help, I suggest you conuslt your issue on windows phone development forum for better support like this thread:
    http://social.msdn.microsoft.com/Forums/en-US/96f5d84c-d6af-4de9-bfb6-d86b516ab9af/how-to-target-wp-80-from-visual-studio-2013-with-update-2-rc?forum=wpdevelop
    Thanks,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to uninstall Windows Phone 8.1 Emulator from Visual Studio

    Hello, I recently installed the Windows Phone 8.1 Emulator for Visual Studio. However, I found out that you need to be running Windows 8/8.1 Pro to deploy the emulator, but my computer is the regular edition of Windows 8.1.
    How would I uninstall the emulator?
    Thanks for your help.

    I recently installed the Windows Phone 8.1 Emulator for Visual Studio
    What exactly did you install? Visual Studio 2013 (Update 2 and above) already includes 8.1 phone emulators, although there is a separate installer available for updated emulator versions. Open Control Panel >> Programs >> Programs and Features,
    and search for "Windows Phone". If the emulator is listed, right-click to uninstall.

  • How would i setup certificate authenticated activesync on a windows phone 8 device? Without intune or sccm?

    I've searched all over for this and can find no clues in the interface.
    We have certificate authentication to activesync, via tmg working well for IOS devices and android, we issue the user a certificate, they use it to authenticate, boom no problems.
    We're considering a move to issuing windows phone 8 devices as well, yet i see no way, or instructions on how to actually set these things up to authenticate with a certificate? I see some rumblings about airwatch and sccm with intune, but i don't want to
    pay for a subscription just to use this when it works fine without on other platforms.
    Can anyone shed any light?
    Many thanks,
    Jim

    Hi - we're authenticating with internally issued certificates against a TMG listener, not sure if that is or isn't mutual certification - I have installed the root on the devices so they are trusted, works great with ios, android etc.
    The main issue is there is no place in the setup where you can specify the certificate to use, i have a feeling they (like blackberry) are railroading you into using a paid for mdm solution for cert auth. Be delighted if that isn't the case tho. It is easy
    enough to do this for WP8 with SCCM and InTune but i'm not keen on taking out a subscription just for WP8 devices when we can do it gratis with ios and android.
    Thanks for the reply.
    Jim

  • How to write and check log for windows phone enterprise app

               We have developed a windows phone enterprise app for our customer, this app will be deployed thorough MDM solution, that is , being installed automatically after the device sucessfully enrolled into the MDM server.
               Our customer required that if this app failed, there should be some log file they could send to us for identify the cause.
               So we catch exception in the app and write the exception message into IsolatedStorage as log file , as following:
    var appStorage = IsolatedStorageFile.GetUserStoreForApplication();
                        using (writer = new StreamWriter(appStorage.CreateFile("errlog.log")))
                            writer.WriteLine(format, arg);
                            writer.Close();
                There seemed no problem to write the log with above code. but the problem is , how can the user get the errlog.log to send to us? I tried both Windows phone power tool and IsoStoreSpy tool,  they both seemed
    not able to read the isolatedstorage for the application to get errlog.log due to this application not installed by themselves.
              Any suggestions?
    Many Thanks
    Jennifer

    The easiest way I see to achieve this goal is to provide a feedback page, search on app local storage to find the log file, ask the end user to click button to submit any feedback and post the log file. You can set up a server to receive that file.
    Try read this blog about consuming RESTful service in windows phone programming to get started.
    http://blogs.msdn.com/b/wsdevsol/archive/2014/01/09/consuming-rest-services-in-your-windows-store-and-phone-applications.aspx.

  • Windows phone 8.1 SDK want to install on WINDOWS 8.1 PRO 32bits...how can i ?

    windows phone 8.1 SDK want to install on WINDOWS 8.1 PRO 32bits...how can i ?
    is there any patch or any other version for windows 8.1 32 bits..to run win phone SDK..?

    Hi,
    According to the reference about Windows SDK, you should install it on a 64 bit system:
    http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff626524(v=vs.105).aspx
    Regards
    Wade Liu
    TechNet Community Support

  • How to disable webview cache for Windows Phone 8.1 Runtime universal app?

    Is it possible to disable cache for the Webview control for a Windows Phone 8.1 runtime universal app? My App seems to be remembering the information it received the first time. My app logs me into a service and when I go back to rerun app in the emulator
    (without completing shutting down the emulator) it logs me in automatically rather than giving me the prompt. This behavior is in the NavigationCompleted handler if that helps explain a bit more on where I am hitting this issue.
    If I were to shut off the emulator completely and then restart it then I am prompted for the login name and password again. I have gotten over this cache issue, when I was using the HttpClient in other part of my app, by sending the no-cache in the header
    as:
    client.DefaultRequestHeaders.Add("Cache-Control", "no-cache");
    Can I do something similar for the webview control?
    thanks
    mujno

    Hi mujno,
    As I know currently there is no programmatically way to clean cache for WebView, see Matt's blog:How to clear the WebView cache
    However if you are developing an enterprise app, you should be able to invoke some scripts to clean for you, see this for more information:Brokered
    Windows Runtime Components for side-loaded Windows Store apps
    --James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How is SQLite used for windows phone 8.1 in Visual Studio2013

    Hi, 
           I'm developing app on Windows 8.1 currently. Can any one please help me with the steps to proceed so that I can create a database using SQLite for windows phone 8.1 through Visual Studio2013.

    Hi SwetaSinha,
    Thank you for posting in MSDN forum.
    Since this forum is to discuss: Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help
    System, and Visual Studio Editor.
    Based on your issue, if you want to know how to create a database using SQLite, I suggest you can ask this issue directly to the  SQLite official website:
    http://www.sqlite.org/support.html, maybe you will get better support.
    In addition, since the SQLite is a extension tool for the Windows Phone 8.1, so I suggest you can post this case to the SQLite for Windows Phone 8.1:https://visualstudiogallery.msdn.microsoft.com/5d97faf6-39e3-4048-a0bc-adde2af75d1b,
    and then click “Q AND A”, you will get better support there.
    Thanks for your understanding.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How share content on whatsApp And Instagram for windows phone 8.1 App Development

    I am developing an App using sharie Contract Ux (using DataTransferManager )
    sample code is given below it is showing facebook ,twitter but not showing whatsApp and Instagram .
    Am I missing something ?
    public sealed partial class MainPage : Page
    private DataTransferManager dataTransferManager;
    public MainPage()
    this.InitializeComponent();
    this.NavigationCacheMode = NavigationCacheMode.Required;
    /// <summary>
    /// Invoked when this page is about to be displayed in a Frame.
    /// </summary>
    /// <param name="e">Event data that describes how this page was reached.
    /// This parameter is typically used to configure the page.</param>
    protected override void OnNavigatedTo(NavigationEventArgs e)
    // TODO: Prepare page for display here.
    // TODO: If your application contains multiple pages, ensure that you are
    // handling the hardware Back button by registering for the
    // Windows.Phone.UI.Input.HardwareButtons.BackPressed event.
    // If you are using the NavigationHelper provided by some templates,
    // this event is handled for you.
    this.dataTransferManager = DataTransferManager.GetForCurrentView();
    this.dataTransferManager.DataRequested += new TypedEventHandler<DataTransferManager, DataRequestedEventArgs>(this.OnDataRequested);
    protected override void OnNavigatedFrom(NavigationEventArgs e)
    this.dataTransferManager.DataRequested -= new TypedEventHandler<DataTransferManager, DataRequestedEventArgs>(this.OnDataRequested);
    private void OnDataRequested(DataTransferManager sender, DataRequestedEventArgs args)
    var request = args.Request as DataRequest;
    DataPackage requestData = request.Data;
    requestData.Properties.Title = "MY PHOTO";
    requestData.Properties.Description = "Share App";// The description is optional.
    requestData.Properties.ContentSourceApplicationLink = new Uri("ms-appx-web:///" + "www.google.com");
    // It's recommended to use both SetBitmap and SetStorageItems for sharing a single image
    // since the target app may only support one or the other.
    List<IStorageItem> imageItems = new List<IStorageItem>();
    imageItems.Add(this.imageFile);
    requestData.SetStorageItems(imageItems);
    RandomAccessStreamReference imageStreamRef = RandomAccessStreamReference.CreateFromFile(this.imageFile);
    requestData.Properties.Thumbnail = imageStreamRef;
    requestData.SetBitmap(imageStreamRef);
    // succeeded = true;
    private async void SelectImageButton_Click(object sender, RoutedEventArgs e)
    // CoreApplicationView view = CoreApplication.GetCurrentView();
    //FileOpenPicker imagePicker = new FileOpenPicker
    // ViewMode = PickerViewMode.Thumbnail,
    // SuggestedStartLocation = PickerLocationId.PicturesLibrary,
    // FileTypeFilter = { ".jpg", ".png", ".bmp", ".gif", ".tif" }
    StorageFile logoFile =
    await Package.Current.InstalledLocation.GetFileAsync("Assets\\download.jpg");
    // List<IStorageItem> storageItems = new List<IStorageItem>();
    this.imageFile = logoFile;
    // ImageHolder.Source = "/Assets/download.jpg";
    Output.Visibility = Visibility.Visible;
    ShareStep.Visibility = Visibility.Visible;
    // if (pickedImage != null)
    // this.imageFile = pickedImage;
    // // Display the image in the UI.
    // IRandomAccessStream displayStream = await pickedImage.OpenAsync(FileAccessMode.Read);
    // BitmapImage bitmapImage = new BitmapImage();
    // bitmapImage.SetSource(displayStream);
    // ImageHolder.Source = bitmapImage;
    //// this.rootPage.NotifyUser("Selected " + pickedImage.Name + ".", NotifyType.StatusMessage);
    // ShareStep.Visibility = Visibility.Visible;
    private StorageFile imageFile;
    private void Button_Click(object sender, RoutedEventArgs e)
    DataTransferManager.ShowShareUI();

    Whatsapp and Instagram must not be Share Targets for the type of content you are sharing.
    Bret Bentzinger (MSFT) @awehellyeah

  • How to develop a Library for Windows Phone 8.1?

    Hello guys!
    I'm a quite new developer in this topic, I have never created a Library and right now, I need to create a library using this project of C because the normal OCRs cannot recognize 7 segments display:
    https://www.unix-ag.uni-kl.de/~auerswal/ssocr/
    Last year, I used a library for SQLite (in the beginning it didn't have a Nuget package) and you must add a C++ project to execute SQLite code in WP8. I hope someone might give me an idea where to read and help me with this project. Thanks a lot
    for your worthy knowledge.
    Federico Navarrete

    I need to use a special OCR that detects 7 Segments Displays. I have been reading during the week and I discovered that the most similar project is this one:
    Seven Segment Optical Character Recognition
    However it's a C project not a C# or VB and I must create a special library (or project) to integrate with my Windows Phone App. As I said before last year I used this article:
    How to use SQLite in Windows Phone
    And in the beginning it was just a C++ project that you must add to manipulate SQLite. So, I think I should create something like that for migrate those libraries and later integrate with my project but I have never worked with this kind of libraries
    or create C/C++ libraries that finally will work with a C# App. Thanks for your time.
    Federico Navarrete

  • How to get the device token in windows phone 8 sliverlight application?

    Hi,
    I am developing a windows phone 8 silverlight application . For my application I want to add push notification service , for this service I have to call one web service in my app . This api requires device token , device id ..etc , I am able to get the all
    the things except devicetoken .
    How to get the device token of a device ?
    any help?
    Thanks...
    Suresh.M

    Most probably device token is the push channel url which is returned by MPNS when a request is made to it.
    Step 3 here: Push notifications for Windows Phone 8
    http://developer.nokia.com/community/wiki/Using_Crypto%2B%2B_library_with_Windows_Phone_8

  • How to update a ListBox binding when a toast message arrives in windows phone

    I have a MVVM windows phone application and it has a Home page where after entering login data it goes to "Posts" page.
    Posts page has PostsModel with the following data :
    class MyClass
    public string NewPostText { get; set; }
    public string NewPostSender { get; set; }
    public string NewPostAttachment { get; set; }
    "Posts" page has the following View Model and GetPosts will read data from isolatedstorage for now i have hardcoded with some static data though.This data needs to be stored back to isolated storage while exiting the app.
    private PostsViewModel _PostsViewModel ;
    public Conversation()
    InitializeComponent();
    _PostsViewModel = new PostsViewModel ();
    this.DataContext = _PostsViewModel ;
    public ObservableCollection<PostsModel> MyPostsDataSource
    get
    if (_MyPostsDataSource== null)
    _MyPostsDataSource= GetMyPosts();
    return _MyPostsDataSource;
    set
    this._MyPostsDataSource = value;
    RaisePropertyChanged("MyPostsDataSource");
    "Posts.cs" has only the following code:
    protected override void OnNavigatedTo(NavigationEventArgs e)
    base.OnNavigatedTo(e);
    "Posts" page has the following xaml:
    <ListBox x:Name="listMyPosts" ItemsSource="{Binding Path=MyPostsDataSource}" Grid.Row="0" >
    <ListBox.ItemTemplate >
    <DataTemplate >
    <StackPanel Orientation="Horizontal">
    <TextBlock Text="{Binding NewPostText ,Mode=TwoWay}"/>
    <TextBlock Text="{Binding NewPostSender}"/>
    </StackPanel>
    <Image x:Name="SenderImage" Margin="8" Source="/MyApp;component/Assets/Icons/NewPostAttachment.png"/>
    </DataTemplate>
    </ListBox.ItemTemplate>
    </ListBox>
    First time when app loads the static data i have shows all the data in the list box without any issues but when a toast message comes all the data is gone and also the new message is also not displayed.
    The question i have is when i get a new toast message(to Posts.xaml page) i just want to refresh the current Posts page with the latest message details . And i dont know how to do this and whether i need to handle this in the page NavigatedTo method(if
    so how do i refresh the or atleast reload the Posts.xaml page with its PREVIOUS data plus the new data as well) as the toast notification has the navigation uri of "/Posts.xaml" page.
    I would really appreciate any help on this ?

    For comparison , Its like a Chat application. When a new message comes and the message is from the user for which the conversation page is already open then we just append the message to it.
    In ShellNotificationReceived we are just calling the "Posts.xaml" page.
     Relative Uri here is " /View/Posts.xaml" plus some paraemters like sender email id , sender message and the image..
    Application.Current.RootVisual
    asPhoneApplicationFrame).Navigate(newUri(relativeUri,
    UriKind.RelativeOrAbsolute))
    Krrishna

  • How can i use shoutcast streams on windows phone?

    I have an idea to make an application but i don't know how to use shoutcast streams in windows phone ? Is there any API or something that i need to fallow?
    Alican

    At the moment Shoutcast audio streams are not supported natively in Windows Phone. You will need to write a self implementation of IMediaStreamSource to parse the audiostream and also handle the http connections to the streaming server.
    Another solution is to use a third party implementation such as www.jupitersdk.com.
    It offers a well documented API, is easy to integrate and use into your project and there is a trial version for testing purposes.
    Jupiter Sdk has successfully been used in several RadioStreaming apps which can be found in the Windows Phone Store. By the way, it allows not only to play Shoutcast and Icecast audiostreams in Windows Phone 8.1, but also to retrieve the stream metadata (i.e.
    current Title and Artist), among other interesting features.
    Disclaimer: I am a member of the Jupiter Sdk Development Team. For information and support you can use the contact form at www.jupitersdk.com

  • How can we use Custom MessageBox in SelectionChangedEvent of LongListSelector for Windows Phone 8

    Dear Sir/Madam,
    How can we use Custom MessageBox in SelectionChangedEvent of LongListSelector for Windows Phone 8.
    Actually my problem is that When i am using Custom  MessageBox in SelectionChangedEvent of LongListSelector,when i am click Open(Left Button) it's working fine and navigated correctly,But when i am Click the No(Right Button) then it stayed in same page
    but all that page is in stuckup i mean that page is not working and not doing any event.
    My C#.net Code
    private async void userPageLongListSelector_SelectionChanged(object sender, SelectionChangedEventArgs e)
    if (e.AddedItems.Count > 0)
    if (userPageLongListSelector.SelectedItem == null)
    return;
    if (dbTenMin == null)
    dbTenMin = new Database(ApplicationData.Current.LocalFolder, "tenMInDBSchema.db");
    await dbTenMin.OpenAsync();
    var res = (sender as LongListSelector).SelectedItem as _10Min._10MinClass.minUserPages;
    var resIndex = (sender as LongListSelector).ItemsSource.IndexOf(userPageLongListSelector.SelectedItem);
    string selectedPageName = res.userPages.ToString();
    string selectedPageDesignUser = res.pageDesignUser.ToString();
    int selectedIndex = resIndex;
    CustomMessageBox messageBox = new CustomMessageBox()
    Caption = "Message...!",
    Message = "This form need offline datalist,Please load now.",
    LeftButtonContent = "Open",
    RightButtonContent = "No"
    messageBox.Dismissed += (s1, e1) =>
    switch (e1.Result)
    case CustomMessageBoxResult.LeftButton:
    string uidAndpwd = _10MinClass._10MinStaticClass.csUidAndPwd.ToString();
    _10MinClass._10MinStaticClass.csDataListPageDetails = selectedPageDataDetailsForSchema.ToString();
    _10MinClass._10MinStaticClass.csAllDataLists = offlineDataBaseDataListNam;
    _10MinClass._10MinStaticClass.csNotCreatedSchemaNameOfDBList = notCreatedDataLists;
    userPageLongListSelector.SelectedItem = null;
    if (dbTenMin != null)
    dbTenMin.Dispose();
    dbTenMin = null;
    NavigationService.Navigate(new Uri("/10MinformDataList.xaml", UriKind.Relative));
    else
    NavigationService.Navigate(new Uri("/10MinformDataList.xaml", UriKind.Relative));
    break;
    case CustomMessageBoxResult.RightButton:
    break;
    case CustomMessageBoxResult.None:
    break;
    default:
    break;
    messageBox.Show();
    Same custom messagebox code working in Phone_BackKeyPress event i am writing the code in Right Button that e.OriginalSource.ToString(); then it is working fine.
    But It is not working in Selection Changed Event in LongListSelector control in Windows Phone 8.
    Please help me,as soon as possible.
    Thanks & Regards,
    SrinivaaS.

    What happens if you leave the implementation for LeftButton empty as well , does the page gets stuck in that case also, if you press left button?
    i.e.
    CustomMessageBox messageBox = new CustomMessageBox()
    Caption = "Message...!",
    Message = "This form need offline datalist,Please load now.",
    LeftButtonContent = "Open",
    RightButtonContent = "No"
    messageBox.Dismissed += (s1, e1) =>
    switch (e1.Result)
    case CustomMessageBoxResult.LeftButton:
    break;
    case CustomMessageBoxResult.RightButton:
    break;
    case CustomMessageBoxResult.None:
    break;
    default:
    break;
    messageBox.Show();
    http://developer.nokia.com/community/wiki/Using_Crypto%2B%2B_library_with_Windows_Phone_8

Maybe you are looking for