Showing posts with label Windows 8. Show all posts
Showing posts with label Windows 8. Show all posts

Tuesday, March 11, 2014

Windows Phone–Removing Duplicate Songs and/or Albums

Time for another post that has nothing to do with development…

If you own a Windows Phone, you have probably seen duplicate songs or albums in your music library. This can be a very frustrating bug to deal with and it is difficult to fix. It would be nice if you could simple select a track or album and delete it right from your phone. Unfortunately, Microsoft does not allow us to do that. It would even be great if connecting the phone to your computer and deleting it files in the file browser or via the Windows Phone app would take care of it for you. Well… no. That doesn’t always work. After struggling with this for a little while, I found a solution that worked for me. Hopefully it works for you too if you are in the same boat. Here is what I did to remove the duplicate songs.

-Connect the phone to your computer with the usb cable and open it up in Windows Explorer.

-Locate the Music folder.

-Select View > Show Hidden Files (from the toolbar or ribbon control depending on what os you are running)

-Once you are seeing the hidden files, you should see an Artists folder that contains a file for each artist in your collection. Find the artist that has the duplicate files and erase that file.

-Navigate to that artist’s corresponding music files directory on your phone and delete those files.

-Copy the music files from your music library on your pc back onto your phone. This should re-generate that file you previously deleted under the hidden Artists directory. This is the file that tells your phone what files to display.

That should do it. You can now disconnect your phone and see no more duplicate files (or at least that worked for me).

Good luck!

Monday, April 1, 2013

MessageDialog - Windows Store App MessageBox.Show Equivalent.

If you are new to Windows Store app development, you may be wondering how to show a simple dialog. It used to be so easy. You simply called MessageBox.Show() and you had a dialog. Well, in Windows Store Applications in Windows 8, it is a bit different but just as easy.

Try this code instead of MessageBox.Show to get the following dialog…

var messageDialog = new Windows.UI.Popups.MessageDialog("Message Text.","Message Header");
messageDialog.ShowAsync();


image


Happy Windows Store App Coding!



Sunday, March 31, 2013

Windows Store App… How to set focus on a textbox

A common task in UI development is setting the focus on a textbox when navigating to a particular screen. When doing this on a Windows 8 application, a lot of developers try to do this inside the OnNavigatedTo event handler. This does not work. To set the focus on a textbox when the page is hit, call the focus method on the particular textbox inside the loaded event handler… That should do it.

<common:LayoutAwarePage
x:Name="pageRoot"

Loaded="pageRoot_Loaded_1">



private void pageRoot_Loaded_1(object sender, RoutedEventArgs e)
{
this.txtName.Focus(FocusState.Programmatic);
}



Hope this helps. Happy Coding!