|
|
Hi Chris, Thanks for replying my previous question here, so far this has been very helpful and instrumental in various apps of mine. I've upgraded some apps to Windows Phone 8 and noticed that this Starter Kit is not compatible with WP8 due to a breaking change. This is because DataContractSerializer now requires the XML data to be alphabetized, as highlighted in the App Platform Compatibility chart at http://msdn.mic rosoft.com/en-u s/library/windo wsphone/develop /jj206947%28v=v s.105%29.aspx. This causes the app to fail because:- settings = (Settings)ser.R eadObject(xr); settings remains null as the XML is unreadable. I've worked around this by moving the XML elements in Settings.xml around so that it is in alphabetical order (PreviewEnabled > RefreshInterval InMinutes > RssFeeds > Title > Theme > Version), which allowed "settings" to populate. However, RefreshSelected Feed() is still broken because the SelectedFeed.Rs sUrl does not populate, although the Title does, even after rearranging the elements in Settings.xml. Currently, I'm working around this by adding a switch:- switch (SelectedFeed.T itle) { case "Example 1": SelectedFeed.Rs sUrl = "http://www.exa mple.com/feed1/ "; break; case "Example 2": SelectedFeed.Rs sUrl = "http://www.exa mple.com/feed2/ "; break; default: break; } Which seems to work fine. My question is, is there a more optimized way to perform this workaround? Thanks.
Yes, writing code that checks for the actual title shouldn't be necessary. It looks like there are data binding errors going on somewhere, or the RssUrl isn't actually getting populated. STep through and look at the deserialized XML document and see if you're getting an RssUrl value, and then (if you are) check the Output window to see if there are any data binding errors. I have some time set aside in a couple weeks to upgrade all the starter kits to WP8, so hopefully by the end of Jan you'll have some new code to look at :) Cheers! Chris
I'm trying to keep people at my site. not navigate away thru my site and I cant find a way to remove these controls also on a slightly different subject I have similar issues with the word press starter kit but cant remove the (url text box) from the web browser please help and my app will be summited before chrismas.
If I understand your question correctly, you're trying to show the web browser without the web browser controls at the bottom. The built-in web browser (Internet Explorer) does NOT allow you to customize it this way, so if you allow the users to launch the web browser, there's nothing you can do about it. If, however, you change the app by removing the Launch in Browser button, you should be OK to keep the user in the app and on your site. LMK if this doesn't answer your question.
First, thank you so much for this sample. It's my inspiration to start my app :) I have change RSS URL and RSS Title and I wondering that how can I change picture of each RSS. I want to assign different pictures to each URL Please help, thanks
Absolutely! It just requires you writing code :) This is a code starter kit, not a product, so it's expected that people will need to make tweaks and other code modifications to get it to work the way they want it to work. Right now, the picture for each feed is determined at runtime by the feed information. If there is no picture detected, a default picture is used. You could alter the code to support a url to a picture for each feed in addition to the metadata that's currently captured with it and use that image instead. Will take some coding but absolutely doable.
i tried this link (http://ttc.ca/RSS/Service_Ale rts/index.rss) in the validator and it said it was fine. When i run it in the app a bug occurs and shuts down. you had mentioned in the past you would try to make this feed work, was it supposed to work since your last update? Sincerely, Ryan
Send me the feed URL and I'll check it out. Remember that this is a starter kit, not a full product, so you might need to tweak the source code to get it to work for your specific needs and environment...
Hi, first of all thanks so much for this sample. I have merged this sample with my own app and is having difficulty running it. Currently, what I've done is I have moved the code from App.xaml.cs into my own MainPage (the starting page of my app). This is so that the code is only launched when someone selects the RSS segment of the app (which makes up a small proportion of it). This means that in MainPage.xaml.cs, I have the following code: private void RSSMode_Click(o bject sender, System.Windows. Input.GestureEv entArgs e) { var vml = Resources["Loca tor"] as RSSViewModelLoc ator; vml.LoadState() ; NavigationServi ce.Navigate(new Uri("/RSSMainVi ew.xaml", UriKind.Relativ e)); } (Where RSSMode_Click is the button for navigating to the RSS Page) However, clicking on this results in the following error at "vml.LoadState( );": "An exception of type 'System.NullRef erenceException ' occurred in App_Name.DLL but was not handled in user code". Right now, the app builds correctly without any errors, so I'm not sure as to what is causing the problem. Along with this issue, I would like to ask: 1. What is the significance of lib/System.Serv iceModel.Syndic ation.dll? 2. If I want to have the "i:Interaction. Triggers" be in C# instead of within the XAML, is it possible and if so, how would I do so? I work better in C# than in XAML and the code I'm trying to work within would probably work better in C#. Once again, thanks for the sample. I look forward to your reply. Thanks!
Oh, solved it! Was missing a character because of my horrid renaming skills. My bad! Sorry for the inconvenience! Still wondering about the "i:Interaction.Triggers" though.
Hey - awesome that you're looking to extend your application with the code from the starter kit! I'll try to help answer your questions. For the first part, it sounds like the ViewModelLocator is no longer part of the App.xaml file - you'll need to add that back in there. As for your questions, #1 - I was using this library to parse RSS and ATOM feeds, but someone complained that this library requires the feed to be valid :-) I removed the code that uses that library, but looks like I forgot to remove the reference. You should be able to remove it OK. #2 - The whole point of the i:Interaction.T riggers was to move that code out of C# and into the XAML. From my experience, more XAML = more better. Less code = more stable. If you want to remove all the declarative functionality I've put in there, you can always write code to respond to things like "button_click" or "selection_chan ged", and deal with all the work manually. If you make these changes and it's still not working, feel free to send me your sample to chris.koenig@mi crosoft,com, I will try to take a look at it and see if I can get it working for you.
i cant get any of the 5 available rss feeds on this website to work http://ttc.ca/RSS/index.jsp . Is their a way to solve this so i can get it to work
OK - I looked at this today and see that the data coming back is a valid RSS feed, but it seems to be based on the older RDF format, which I have not accounted for in the code. I will see if I can do about making some updates, but I can't commit to any specific delivery date...
hey chris, I just wanted to use this kit to create a RSS reader for my blog. But, when I change some texts like the texts on the panorama page where some informations about the selected feeds are displayed, I get an exception right after start on the line with UserIdleDetectionMode. VisualStudio says it's a NullReferenceEx ception. when i comment the line out, It won't help, I get another NullReferenceEx ception on the MainView. Please fix it or tell me, what I'm doing wrong. And please add all strings to the Localization files, so I can localize this kit easily
Sorry you're having problems with the starter kit. These are samples that are intended to be built upon by members of the community. If you would like to add localization, please send me a pull request from the Git project and I'll happily integrate your changes into the main branch. I can't make any promises about future updates, but if you'll go to the github project for this app and add an issue, it will help me track them. AS far as the error in your source code, I'd have to see it to diagnose it. Can you send me a zip of the project to chris.koenig@microsoft.com? I will see if I can figure out what went wrong...
I downloaded the kit and changed it to use my own blogs, but it does not work with my blogspot blogs. Yes, it work with the wordpress ones. In others blogs it works with the rss feed, but does not works with the atom feed. I think the blogspot blogs only works with the atom feed. Can I get any solution? Thanks Luis Martinez
You could send me a link to the feed for the item that's not working and I could give it a look. In general, they need to be properly formatted and validated feeds. Do your feeds pass the tests at http://feedvalidator.org?
I wish to add new blogs in code but how would I send the address properly in code? I wish to put this on windows phone marketplace is it still okay to do that? I plan on a free rss app with ads but will give credit. Also, might use for an app for people with windows 7 phones at our school system with no ads (I work in IT but try to contribute helpful code to the school to produce productive learning).
This is a code sample to help you get started - so all of those things are perfectly fine. Good luck with your app development, and make sure to have fun doing it!
There is not really an easy way to link these to kits together. Again, they're meant to be code samples for people to use as a launching point. You could pull the classes from the RSS Starter Kit into the WordPress app and wire up some new views, but that would require programming experience. If you're willing to dig into it, it would be a fun exercise in learning more about .NET and the Windows Phone development environment :-)