yashsingh1/xdaforums huggingface dataset:
[Windows Phone 7 Software Development] GFR_2009:
Hi there,

I have a ListBox bounded to a query (linq to xml)

Dim CASDAs XDocument = XDocument.Load("./Data/CASD.xml")

Dim CAS_Query As System.Collections.IEnumerable = From query In Cartridge_Doc.Descendants("Cartridges") Order By _

CStr(query.Element("AA")) Descending, CStr(query.Element("AA"))

Select New Cartridge_Data With {.AA1 = CStr(query.Element("AA")), _

.BB1= CStr(query.Element("BB")), _

.CC1 = CStr(query.Element("CC"))}

Me.ListBox_1.ItemsSource = CAS_Query

Now, what I need to do is to select an item and have the option to delete it.

So far, I always got a run-time exception when trying this

Me.ListBox_1.Items.Remove(Me.ListBox_1.SelectedItem)

System.InvalidOperationException was unhandled

Message=Operation not supported on read-only collection.

So far I have tried a lot of options without any luck.

Any help will be greatly appreciated!

Thanks in advance.
[Windows Phone 7 Software Development] emigrating:
Stick your Linq result in an ObservableCollection, bind this to the Listbox and delete the item directly from the underlaying collection.
[Windows Phone 7 Software Development] GFR_2009:
Please, can you poost a little code to do that? I'm fairly new to this collections world.

On the other hand, once the item got deleted, how the Listbox gets refreshed?

Thanks!
[Windows Phone 7 Software Development] Ren13B:
You have to set up an NotifyPropertyChanged class to keep the listbox updated with your collection. The default phone list application template that comes with Visual Studio shows you how to do this. I think its's in c# though and it looks like you're coding in VB. I'm sure there's examples in VB you can find on the web with a little searching.
[Windows Phone 7 Software Development] GFR_2009:
My ListBox takes its data from an XML file via query.

Which strategy do you think is the best?

To first delete the Xelement then refresh the ListBox?

Or deleting from the item from the ListBox, then update the XML file?

Sorry but I have all the samples from MS and didn't find any phone list one.

Any code will be greatly appreciated!
[Windows Phone 7 Software Development] Ren13B:
Oops. It's called "Windows Phone Databound Application". Attached is a screenshot of the project if it makes it easier for you to find it.

It's hard to post code because I don't know what your xaml looks like and bindings have to be set there for it to work. The best thing you can do is load the above project and play around with it.

You never have to refresh the items in the listbox. A bound listbox updates itself when an item in the collection changes. Change the collection and your listbox will reflect those changes. The NotifyPropertyChanged class is what triggers the listbox to update itself.
[Windows Phone 7 Software Development] emigrating:
I do C#, not VB but the following should give you some idea.

public class Model : INotifyPropertyChanged
{
public string Title { get; set; }
public string Blurb { get; set; }

public event PropertyChangedEventHandler PropChanged;
public void NotifyPropertyChanged(String _propName)
{
if (null!=PropChanged)
{ PropChanged(this, new PropertyChangedEventArgs(_propName)); }
}
}

The above is your model, create any properties you need there - i.e. one per item of data in your XML file.

Next, you need to create an ObservableCollection somewhere, for the sake of simplicity let's stick it in your MainPage.xaml.cs file for now, so;

public partial class MainPage : PhoneApplicationPage
{
public ObservableCollection<Model> Items { get; set; }

public MainPage()
{
InitializeComponent();
this.Items = new ObservableCollection<Model>();
MyListBox.ItemsSource = this.Items;

WebClient wc = new WebClient();
wc.OpenReadCompleted += wc_OpenReadCompleted;
wc.OpenReadAsync(new Uri("http://your.server.here/datafile.xml");
}

public void wc_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e)
{
using (Stream s = e.Result)
{
XDocument xd = Xdocument.Load(s);
var XMLdata = (from q in doc.Descendants("Item") select new Model()
{
Title = (string)q.Element("Title"),
Blurb = (string)q.Element("Blurb")
}

foreach (Model m in XMLdata)
{
this.Items.Add(m);
}
}
}

public MyListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
ListBox lb = (ListBox)sender;
if (lb.SelectedIndex == -1)
return;

this.Items.Remove(lb.SelectedItem)
}
}

This will create a collection named Items as well as tell your ListBox (named MyListBox) to get it's data from said collection. Then it will read (asynchroniously) the XML file from the web and copy each item of data into your collection.

When you select an item in your ListBox it will be deleted from the ObservableCollection which in turn will remove it from the view (ListBox). At this stage you want to include code to also remove this from your actual XML file and so on of course. But the idea is that you work on your Collection only and your View will update based on what is changed - automagically.

Please note, the above code may or may not work out of the box. Written directly here on the forums so it hasn't gone thru VS2010's excellent IntelliSense. Also, the above code is in no way the most efficient way of doing certain things, but it gives you an idea as to what code you need to write to handle your scenario.

While I wrote this I see you've got an answer above which directs you to the VS template - use that and everything should become clear. All you have to remember is that perform operations on the Collection - not directly on the ListBox and you'll be fine.
[Windows Phone 7 Software Development] GFR_2009:
Emigrating and Ren13B,

Thanks to both of you for the help. Very appreciated!

Will take both advices to see what comes up.

Thanks!
[Captivate Themes and Apps] Aftashok:
how difficult is it to port a theme over? i really like Reefermattness's Darkness theme (http://xdaforums.com/showthread.php?t=813497) - but with as vivid as the colors on this phone are, i love the dena994 theme ANDRODeNa GaLaSSiA - (http://xdaforums.com/showthread.php?t=770507) - but its an i9000 theme.

i want to take the dialer, the semi-transparent notification background with the Galaxy S symbol, and maybe even the dark look in menus and such, from the Darkness theme, but the notification pull-down look and the icons from the ANDRODeNa GaLaSSiA theme, and combine the two. im using the Perception ROM, which is i9000-based, so i'd assume id be able to use elements of the ANDRODeNa theme.

how difficult would it be to do so, or an even better question, what would be the steps to do so? (if anyone wanted to take the time to do so, i wouldnt mind that at all either - and donate even).
[Captivate Themes and Apps] blackjackboy:
Since your using an i9000 rom, you'd be able to just use the second theme as is, but the darkness theme would be complicated and I'm not entity sure how you'd do it.
[Captivate Themes and Apps] DAGr8:
there you go .
[Captivate Themes and Apps] avgjoegeek:
If it's a metamorph theme - it should probably work.

But I would back up your framework-res.apk and wherever the dialer theme is pushed too before attempting it.

Worse case scenario is your phone will boot but will "boot-loop" when attempting to go to your home screen or go to a black screen.

You'd have to re-copy over the *.apk's affected and you would have your phone back.

Another way to do it is before flashing to your latest and greatest (or copying over the *.apk's) you could open up the APK files using WINRAR or your fav zip program and copy the *.png's into them overwriting the existing ones then flash or copy the modified APK files back into your system.

It's a pain... but it does work I've done it many times with positive results.
[Omnia 7 General] Nowaynoway:
Guys,

i need to know how do the following thing in windows phone 7, i have Samsung Omnia 7 :

1. how to change the background of people hub?

2. how to backup and restore all app’s on my phone using Zune?

3. how to purchase again an app using the Zune when you reset the phone? the Zune always says that the item has been already purchase and it will not allow you to purchase it again. while from the phone itself i can visit the marketplace and purchase the app ?

4. how to backup all contact in my phone with their link to Facebook?
[Click General] dusan7:
Is there some way to get the GPRS and WIFI connection working on the same time?

As soon I activate the WIFI connection, the GPRS switches automatically off.:confused:
[Click General] Mithun_srk05:
Not possible :-) WIFI is always the first priority!!!
[HD2 Android Q&A, Help & Troubleshooting and Genera] irulesoha:
T-Mobile USA

Android Version: Mattc Leo + Froyo w/Sense 1.8 (2.2)

WinMo: Energy

Radio: 2.10.50.26

Alright, I have no idea what's wrong with this thing. I get intermittent signal. Sometimes 3g works, other times I have to jump back to WinMo.

Anyone else have this problem? Know how to fix it?
[HD2 Android Q&A, Help & Troubleshooting and Genera] devastatorx:
You will have to be more specific. Are these data drops where you lose data completely and have to reboot? Is it spotty coverage? (I have this problem at home) What kernel are you using? Have you tried different radios? (I haven't had any luck with radios below 2.14 on my phone and it seems everyone gets mixed results when it comes to this, you just have to find out what works best for you).

Have you tried installing Letama's wrapper to fix data drops?
[Shift General] Pinio666:
Welcome

I have a problem. Format the Shift and installed its Windows 7 Unfortunately I have not turned on WiFi and Bluetooth ..... Can someone help me and tell how you can turn on WiFi now in Windows 7?
[Shift General] Tokl:
Hi,

i used this guide and it works!:

http://xdaforums.com/showthread.php?t=686584

The important part is:

first install HTC SHIFT shagctrl_1[1].2.6.122-control center

then:

15. Right Click on Synaptics Pointing Device in the tray of Win7 -> Pointing Device Properties -> Device Settings ->

Synaptics Touchpad V 6.5 -> Settings -> Buttons -> Scroll Left Button Action -> Run a program of your choosing -> C:\Program Files\HTC\ControlCenterLauncher.exe -> Apply.

Now you can enable/disable WiFi/Bluetooth/Modem by clicking on the hardware button and select it.

Greetz Tokl
[Shift General] Pinio666:
BlueScreen login Windows 7

Welcome

The problem is that after installing Windows 7 installs the drivers and I see that the resolution is 600x480 after reboot shift when logging into the system bluescreen pops up and I see that the resolution is changed .... Several times to reinstall the system does not help. All the time this problem started after 2 Shift is higher resolution and how to log on bluescreen pops up. What should I do?
[Shift General] Flanimal:
Right click on the desktop and select personalization.

Scroll down and select a 'high contrast', 'basic' theme. Click ok.

This applies a non -aero theme.

After this, you should not see the bluescreen anymore, so you can install all the display driver updates. After applying such updates, you can then choose an aero theme and it wont crash you Shift any more.
[Shift General] orb3000:
Welcome to forums

Please read and respect forum rules, no double posting is allowed

Merging threads as you have already some replies
[Hero CDMA General] timmymarsh:
Double posting of thread, therefore closed.

Tim.
[myTouch 3G, Magic General] bbv203:
EDIT: Basically I was getting the errors because the phone had done the OTA update to FRG83D and the file I was trying to use to restore it was for FRG83B Here is the link to the second file for FRG83D http://android.clients.google.com/p...7ff5575808.signed-opal-ota-75603.687ff557.zip

Long story short, my son has this phone, I rooted it with a unoffical 2.2.1 rom that was running around a few weeks ago. While I was at work one day he downloaded the OTA which broke root and caused FC's on tons of stuff, couldn't even het to the home screen or into the menu. I rebooted into recovery, (which was not RA like I had put on it, now it was back to stock) did a data wipe as well as a wipe of cache, now it won't boot past the splash screen.

I can get into fastboot and stock recovery. Phone is recognized under fastboot, but not through adb. Can someone point me in the right direction, not new to android just the MT3G.....

SAPPHIRE PVT 32B SHIP S-ON G

HBOOT-1.33.0013 (SAPP30000)

CLPD-10

RADIO-2.22.28.25

OCT 21 2009,22:33:277

Fastboot version: version-main: 1.88.531.1
[myTouch 3G, Magic General] mumilover:
You are in good shape...

Run this command and post the output!

fastboot getvar cid

Then we can determine which RUU to flash to get back to stock...

From there you can either update OTA, or root and flash whatever you want!
[myTouch 3G, Magic General] bbv203:
C:\Users\Owner>fastboot getvar cid

cid: T-MOB010Æ^á►

finished. total time: 0.002s

I don't think a ruu will work though, seeing as the phone will only connect to the computer in fastboot. I also tried the stock SAPPIMG.nbh and it doesn't get picked up in fastboot.
[myTouch 3G, Magic General] mumilover:
Type

fastboot oem rebootRUU

Then you should be in RUU mode... now try to run the ruu and it should find your device!
[myTouch 3G, Magic General] bbv203:
EDIT: I tried a different RUU, and it went a little further, but ended up saying:

ERROR[156]: IMAGE ERROR

The ROM Update Utility cannot update your Android phone.

Please get the correct ROM Update Utility and try again.

ERROR[170]: USB CONNECTION ERROR in the ruu program

Fastboot screen does show "RUU USB"
[myTouch 3G, Magic General] bbv203:
Looks like the hboot upgraded, but the rest isn't, and it won't let me downgrade because of the upgraded hboot. Soooo if anyone has the official 2.2.1 RUU for this phone please let me know!!
[myTouch 3G, Magic General] TonyDeez:
I'm in the exact predicament as the OP, good luck to solving this.
[myTouch 3G, Magic General] bbv203:
I think I fixed it, while looking around I found this post and flashed the file through stock recovery. I'm booted and setting up now.

http://android.clients.google.com/p...7ff5575808.signed-opal-ota-75603.687ff557.zip

Link to OP http://xdaforums.com/showpost.php?p=9243367&postcount=1019
[myTouch 3G, Magic General] Asadullah:
I'm in a pretty similar predicament I flashed the new hboot then the 2.2.1 then tried out a new boot.img with the r.o secure=0 in build prop. Then i rebooted to recovery and it was stock? so I'm like f*ck. So I reboot the device and it's stuck at the green screen.

I've got the tmobile mytouch 32b with the latest hboot and recovery and no system.img
[myTouch 3G, Magic General] bbv203:
I think that's about the same situation I was in, try flashing the file above in stock recovery, don't see how it can do anymore damage. At least that's where I was at with the phone. I couldn't even use a goldcard to do anything, but this worked.
[myTouch 3G, Magic General] Asadullah:
So I'm flashing the zip you posted right now and let me tell you when I saw it installing my I started sweating and now it's going to the android logo. It booted Thank you for the find
[myTouch 3G, Magic General] Asadullah:
I tell you what messed me up is I used the wrong flash_image binary when I tried to flash the boot.img
[myTouch 3G, Magic General] bbv203:
Glad it worked! I spent about a day and a half dicking around with this thing, getting no where, then I found that and all troubles where gone in a matter of minutes.
[myTouch 3G, Magic General] Asadullah:
Yeah this should be stickied. I'm a sprint hero user myself and although the phones are very similar it's got enough of a difference to screw you. So did you get that sigh of relief like I did. Mine comes mainly from the fact I know my girlfriend isn't gonna kill me or know about this.
[myTouch 3G, Magic General] bbv203:
LOL, yeah this is my kids phone and I was about to just buy a new one to shut him up and just mess with this when I had time. But yeah, I've done most of my stuff on the cdma Hero and now I've got the EVO. NEVER have I ran into a mess like this before.
[myTouch 3G, Magic General] Asadullah:
just a note for people in the future use superoneclick to root and then clockwork mod ion/magic gsm for recovery
[myTouch 3G, Magic General] bbv203:
I used Superoneclick to root but in order to get the recovery to stick I had to remove /system/etc/install-recovery.sh from the rom.. then flash ra or clockwork
[myTouch 3G, Magic General] TonyDeez:
What if I don't have a stock recovery? I flashed another rom in hopes of avoiding the stock recovery reflash itself every boot-up. Unfortunately now I'm stuck with rebooting green screens with clockworkmod recovery.
[myTouch 3G, Magic General] bbv203:
From what I've read, I don't think this updated radio and spl will work with other ROM's yet. You could try flashing it in clockwork though. A couple of posts up I put the file you need to remove to avoid the stock recovery from reflashing itself everytime.
[myTouch 3G, Magic General] TonyDeez:
Upon flashing the ota you posted, the installation aborts shortly after initiating. Is there anyway for me to flash the stock recovery image?
[myTouch 3G, Magic General] bbv203:
You don't have a nandroid you can restore?
[myTouch 3G, Magic General] TonyDeez:
I have a nandroid but it's from a previous myTouch that was at 1.6 backed up using Amon Ra's 1.6.2 recovery. Not sure if it'll work.
[myTouch 3G, Magic General] bbv203:
I might be able to get one off my sons that is the 2.2, but unsure if it will work.

Have you tried flashing the rooted version of the OTA? Seems like since you have a custom recovery you should be able to do that
[myTouch 3G, Magic General] TonyDeez:
I've tried various ROMs (all of them are some sort of custom rooted 2.2 OTA), and all have been stuck at the green screen. If you have some sort of official rooted OTA rom link, I'm happy to try. If you're willing to nandroid your son's OTA, I'll be happy to try.

Just to be safe: is there any chance of bricking my phone if I restore from another phone's nandroid?

Thanks in advance!
[myTouch 3G, Magic General] Asadullah:
I know what you mean. There isn't a custom rom with just root and read/write permissions. I took the boot.img split it then changed the r.o.secure=1 to r.o.secure=0 in the build prop of the ramdisk. Then used mkbootfs to re-cpio and gzip the ramdisk then used mkbootimg to make a new boot.img. I then took a system.img from a nandroid backup made with clockwork unyaffed it which gives me the files I need to make a custom rom. I haven't made the update zip because I tried to get the boot.img to boot yet I really want to be able to adb remount but I'm getting closer and I'll post it as soon as I do. It'll be a stock rom with su and adb remount capabilities
[Galaxy S I9000 Q&A, Help & Troubleshooting] Muffel2k:
Good morning guys,

I recently installed this custom rom . Everything seems to be fine, I hide the status bar with the Launcher Pro (it just show up inside the menu and the lockscreen).Now I would like to remove the status bar on the lockscreen and add another battery widget.

I already found this thread. Are there any further information about this?

Greetings

Muffel2k
[Galaxy S I9000 Q&A, Help & Troubleshooting] m1ket:
One easy way would be to use an app, You can use a number of lock screen apps they offer features you are after

Ive used this one in the past http://www.appbrain.com/app/widgetlocker-lockscreen/com.teslacoilsw.widgetlocker
[Galaxy S I9000 Q&A, Help & Troubleshooting] Muffel2k:
Yeah, that would be another way but I like the lockscreen, just want to remove the status bar on the top.

Well try to contact the custom rom designer, perhaps he can do it for me

Edit

Spoke with the developer and it's not possible with his rom .. so this thread can be closed
[Galaxy S I9000 Q&A, Help & Troubleshooting] bajasolid:
There's a thread on this already. >>> Here <<<
[Galaxy S I9000 Q&A, Help & Troubleshooting] Muffel2k:
omg :eek:

Thanks a lot :):)
[Desire HD General] irfanhks:
hi guyz i just buy htc desire HD yesterday its amazing phone wow! but i have to ask senior members to how can i transfer my sms(messages) touch pro to htc desire HD plz help me

appriciate :)
[Desire HD General] chrisa86:
Could use Mobile Phone Backup (or no doubt countless other programs) to backup to your SD Card and then restore to new phone?
[Desire HD General] olivierlee:
Have you tried the transfer data app from the DHD? I heard it could do that.
[Desire HD General] MiKA7:
Or you can use sms backup & restore which have app for both winmo and android.. used it myself migrating from touch pro2..

Sent from my Desire HD
[Desire HD General] berek9999:
+1. Works flawlessly.
[Desire HD General] irfanhks:
@chrisa86 - MiKA7 - berek9999 ( i thik you r right let me try then i will inform you thnkx buddy)

@olivierlee ( ya i tried already its only transfer contacts only ) :S
[Desire HD General] deechte:
I used Sprite Migrate. It works great, does your Contacts, Call Logs, SMS and Bookmarks and amazingly it's free!
[Desire HD General] onesolo:
I tried that but it doesn't not work 100% right.

It can backup and restore all your SMSs, but at least 50% or more of them don't get linked right with the contact that sent the SMS.

Do you know if it wipes all your SMSs that you may already have on the DHD?!?

I was going trying to backup and restore again with this new app but I'm afraid to loose the SMSs that I already have on the DHD...
[Desire HD General] deechte:
It will insert the migrated data over your existing data. So you'd have to back that up first and restore that after the migration.
[Vibrant Q&A, Help & Troubleshooting] SamsungVibrant:
When setcpu first starts, I choose autodetect speeds. Next, it only gives me the option to set a max frequency of 1ghz. How can I change the max frequency to 1.2ghz?
[Vibrant Q&A, Help & Troubleshooting] Master™:
You have to use an overclock kernel...
[Vibrant Q&A, Help & Troubleshooting] SamsungVibrant:
Ahhh I see.

What about the overclock script provided by justanothercrowd?
[Vibrant Q&A, Help & Troubleshooting] Master™:
You still need a custom kernel to overclock. That script is so you don't have to use SetCPU
[Vibrant Q&A, Help & Troubleshooting] SamsungVibrant:
got it, thanks!
[Vibrant Q&A, Help & Troubleshooting] suemer:
i just use this...

Android Revolution HD 2.0.4 [08.01.2011]

...max frequency 1 ghz for me - but the author has 1.22 ghz - how its possible???
[Droid 2 Android Development] UrbanBounca:
I was searched for a bootloader SBF last night to service my dead Droid 2, and I came across an amazing site with both, 2.35 and 2.37 bootloader versions, along with the original 2.2 that was shipped with the handset on release.

http://and-developers.com/sbf:droid2

I also have a question, if I wanted to flash back to 2.2, is it the latest (2.37) that won't allow it or did 2.35 block it?
[Droid 2 Android Development] UrbanBounca:
For the record, my process was the following to repair a "Code Corrupt" in bootloader on the Droid 2:

- Download RSD Lite, the bootloader SBF, and the 2.3.20 SBF from MDW.

- Turn phone on, load bootloader SBF via RSD Lite

- The phone will restart, hold "X", and boot into recovery.

- Wipe all

- Pull battery

- Replace battery, hold "Up" on power up (back to flash mode, "Code Corrupt" should be gone)

- Flash SBF

- Pull battery when completed, ("Code Corrupt" will show back up)

- Reload bootloader SBF

- When completed, phone should boot back into a freshly flashed 2.3.20

This was my process, but yours may differ slightly.
[Droid 2 Android Development] mikeyinid:
Nice...im pretty sure this is exactly what i posted in the other thread for you to do. Im glad you got it figured out man. Sbf is something you need to know if your gonna flash roms on this phone :)

Shot from my level 60 crossbow of awesomness!
[Droid 2 Android Development] Mr1070:
Is there an sbf for the r2d2 yet????
[Droid 2 Android Development] iwearhats:
Oh yeah. Search for Team Black Hat 2.3.20 Triple Threat on Google. Use the full system SBF.

I did it. I'll answer any questions.
[Droid 2 Android Development] hatzie:
My phone on 2.2.20 has Bootloader D2.35.

Dunno if you can SBF the 2.35 over the 2.37 though.
[Droid 2 Android Development] droidmakespwn:
I heard its a bad idea to go backwards.