ListView - ObservableCollection Visibility / Refreshing Issues.

5 posts, 1 answers
  1. Headygains
    Headygains avatar
    21 posts
    Member since:
    Dec 2019

    Posted 08 Jun 2020 Link to this post

    I've created a(n) implementation of Bluetooth printer discovery for zebra printers. The listview I used to display the "DiscoveredPrinters" is a RadListView. 

    I'm experiencing a nice array of issues relating to this endeavor, and now I'm resorting to this post.

    Current Issues:

    -#1 RadListView Items only display when screen is rotated Landscape

    -#2 RadListView doesn't update when underlying ObservableCollection is updated (May be related to #1).

     

    Code can be found here for reproduction, You may have to remove some non-public dependencies in order to run it.

     

    Currently the Files related to this issue:

    - MainPage

    - MainPageViewModel

    -Views/Settings/PrintersView.xaml(.cs)

     

    Currently I am only using the single page (MainPage) and Single ViewModel (MainPageViewModel).

    I then swap out the ContentView in the RadSlideDrawer in the MainPage to navigate through views.

     

     

     

     

  2. Headygains
    Headygains avatar
    21 posts
    Member since:
    Dec 2019

    Posted 08 Jun 2020 Link to this post

    Apologies the link to the repo with code is: https://github.com/headygains/Smart.Warehouse.Universal
  3. Answer
    Lance | Manager Technical Support
    Admin
    Lance | Manager Technical Support avatar
    1195 posts

    Posted 08 Jun 2020 Link to this post

    Hello Dalton,

    Thank you for sharing the code, it was critical to discovering the problem. 

    Problem

    Please put aside a few minutes to carefully read this article which explains the issue and provides a couple solutions - Troubleshooting: Controls are not Appearing. In your case, the StackLayout at the root is breaking UI virtualization (the "not enough room" problem). 

    Solution

    Just remove the StackLayout. Since you already have a Grid, and the RadListView is in the star-sized RowDefinition, that's all you need for the root element

    Note: Although a redraw when orientation changes temporarily resolves the issue, it's a lucky coincidence.

    Further Assistance

    If you have any further trouble, please open a Support Ticket so we can assist. A forum thread doesn't carry a guaranteed response time like your Priority Support license has. Although not relevant in this case because you have a GitHub repo, you can attach ZIP files with your code to a ticket.

    We do our best to answer forum posts in a timely manner, but this is limited by current workload and can take a few days at worse. Whereas a Support Ticket is always answered within the ticket's timeframe.

    Regards,
    Lance | Manager - Technical Support
    Progress Telerik

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
  4. Headygains
    Headygains avatar
    21 posts
    Member since:
    Dec 2019

    Posted 08 Jun 2020 in reply to Lance | Manager Technical Support Link to this post

    Thank you for such a quick response! I knew it would be something so minor that I was glossing over!
  5. Lance | Manager Technical Support
    Admin
    Lance | Manager Technical Support avatar
    1195 posts

    Posted 08 Jun 2020 Link to this post

    Hi Dalton,

    I'm happy to see this resolved the issue!

    If you would like to see a real world example of this kind of setup, you can review the official Telerik CRM demo I built on GitHub - Art Gallery CRM. Although I'm using MasterDetailPage + ContentPage instead of ContentViews, a lot of the same problem-states creep up. I overcame many of those common issues and it might be a good resource to keep handy.

    If you would like a ContentPresenter + ContentView example, you can review the infrastructure I built for the LoginView VSExtensions Item Templates (just create an empty test project and add a LoginView).

    Regards,
    Lance | Manager - Technical Support
    Progress Telerik

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
Back to Top