text:
Part 3: Writing your First Windows Phone 8 App
Source Code: https://aka.ms/absbeginnerdevwp8
PDF Version: https://aka.ms/absbeginnerdevwp8pdf
Now that we have the tools we need installed, we can build our first Windows Phone 8 app.
Here's our game plan:
- We'll create a new Windows Phone App project
- We'll make some simple edits, like removing comments and adding a MediaControl and a Button control and we'll style it up
- We'll write an event handler that will respond to the click event of the Button
- In the Button click event handler we'll play a wav sound file
1. Create a new Windows Phone App project, name it "PetSounds"
Hopefully some of the basics steps like creating new projects, adding new files and so on are already familiar to you from personal experience or from watching other Absolute Beginner's series on Channel9. I won't take much time to explain those ... if something is unfamiliar, you may want to review the C# for Absolute Beginners series:
- File
- New
- Project ...
In the New Project dialog:
- Make sure you're in the Windows Phone project templates
- Select the Windows Phone App project template
- Rename to: PetSounds
- Make sure the name of the Solution has changed to "PetSounds" as well
- Click OK
You may see the following dialog:
Since this series is only targeting the Windows Phone OS 8.0, select this option. Just know that you can create apps that target previous versions of the Windows Phone operating system in Visual Studio if you want to expand your apps reach to owners of older Windows Phone devices.
2. Delete unnecessary comments to more easily navigate through the code
After a few moments, the new Project will be created and loaded into the Solution Explorer, and the MainPage.xaml will be visible in the main area of Visual Studio. Notice that these "screens" are called "Pages", as in MainPage.xaml. In our first apps we'll only work with a single "page", but in other apps we'll add pages and navigate between them.
I'll assume you've never worked with a Windows Phone project template before. You'll see the MainPage.xaml loaded into the visual designer:
- On the left, you'll see the visual designer. While you can use this as your primary means of laying out and adding controls to your Windows Phone app, I use it primarily as feedback for what I do in the ...
- XAML editor pane, on the right. I typically write all my XAML by hand. Changes I make in the XAML code will be reflected in the visual designer and vice versa. They are two perspectives, but represent the same thing.
There are a number of tools beneath the panes:
... and between the panes:
... feel free to experiment with them. They are self explanatory and you need to take a moment to play around with them and understand their usage. However, since it's not critical to our lesson, I want to move ahead. In the XAML pane, I want to remove two large comment passages so that it's easier to navigate through the XAML. I've identified these sections as follows:
You can safely delete these comments. Be sure to delete everything from the starting:
... to the ending ...
Your XAML should look like this:
We'll be focusing on the "ContentPanel" beginning in line 36 throughout this lesson adding new XAML code between the opening and closing <Grid> elements.
3. Add a Button control to the ContentPanel and style it
Add the following code between the opening and closing <Grid> elements:
Once you add the:
... code, notice how the visual designer changes:
The button takes up practically the entire area of the screen. That won't do ... we need to limit the size of the Button by setting a Height and Width attribute:
The value "200" infers "200 pixels".
The visual designer updates to a smaller button size:
Let's move the Button control to the upper left-hand corner of the page (beneath the page title), and make its background color red:
I also gave the <Button> control a name so that I can reference that control in C#. Giving controls names is optional. You only need to give things names that you want to access somehow in C#. I know I'll want to access the button later, so I give it a programmatic name now.
The visual designer updates to show the effect of our changes:
That's a great start. You can see that we can manipulate the visual qualities of objects on our Windows Phone page by setting it's attributes.
4. Add a MediaElement control
Next, let's add a MediaElement control to the XAML, beneath the Button control:
Notice I can add whitespace and extra lines between my XAML code and it won't harm anything. As you'll learn later, Visual Studio will automatically indent and space the code for readability, however it will not impact how it is rendered on the page.
Also, I've not set the Source attribute of the MediaElement yet. That's because I do not have any sources (i.e., media elements, like sound files) in my project to choose from.
5. Add a wav file as an asset to the project
Make sure you've downloaded the assets the accompany this video. You can download them from the place where you downloaded this document, or are watching the videos.
I've unzipped that file into a folder called C9Phone8 in my Documents directory.
The C9Phone8 directory has 3 sub-directories:
We want to use the assets contained in the PetSounds_Assets folder. Inside that folder, there's two sub folders ... we want to copy the Audio sub-folder into our project.
The target for our Audio folder is the Assets subfolder of our project:
I drag and drop the Audio folder from Windows Explorer to the target directory in Visual Studio's Solution Explorer, specifically the Assets folder ... now my Assets folder looks like this as I expand everything out:
There are a number of .wav sound files in my app. I want to access one specific file ... a Duck.wav file. I'll add that as the value for the Source attribute in my MediaElement XAML element:
First, notice that I added the full subfolder path relative to the MainPage.xaml file, which lives in the project's root directory.
Second, notice that I also have added two more attributes ... I set Volume to "1" which means the loudest. Many settings in the Windows Phone API are 0.0 for the smallest and 1.0 for the largest value, with 0.5 somewhere in between. Most of these values are the C# data type Double.
Third, I will want to access this control programmatically to trigger the playback of the sound when someone taps the button, so I'll need to give the MediaControl a name. You may wonder what the x: prefix is for ... I'll explain that in the next lesson. Just keep that in the back of your mind for now.
Finally, I set the AutoPlay attribute to "False". If I set this to "True", the Duck.wav sound file would play immediately as my app loaded. That's not what I want. I want to trigger the wav file to play when I click the "Quack" button. We'll write code to accomplish that next.
6. Add an event handler for the Button click event
In the <Button> XAML element, I'll add the Click="" attribute. Visual Studio's Intellisense feature gives me the option to create a new event handler:
Making sure that option is highlighted, I'll hit the enter key on my keyboard to generate a name for the click event handler:
I want to write code that will execute when someone clicks the button, so I'll want to navigate to the PlayAudioButton_Click() method and write C# code there.
I right-click anywhere on that line of code and choose "Navigate to Event Handler" from the context menu:
This opens up a file called MainPage.xaml.cs in the main area of Visual Studio.
If you're new to creating Windows, Web or now Phone apps in Visual Studio, you'll come to realize that there's two parts to these "pages" we're creating. The XAML and design view allows us to write declarative code (XAML). The related code view (the .cs file) allows us to define behavior in C#. These are two halves of the same concept. More on that later. In Visual Studio, your cursor should be located between the opening and closing curly braces for the PlayAudioButton_Click() method:
Since this code block will execute whenever someone taps the Quack button on the phone, we'll want to trigger the MediaElement to play the sound we set in its Source attribute, namely, the Quack.wav file:
I use the MediaElement's name, QuackMediaElement, to access it programmatically. I want to call its Play() method to kick off the playback of the Source, in other words, the Quack.wav file.
Now, let's test the app.
7. Run the app
Again, this should be familiar to you. You'll run the application in debug mode the same way you would run Console applications that we created in the C# Fundamentals series ... by either using the Play button in the toolbar OR using the F5 key on your keyboard.
What you see next is the Windows Phone Emulator. It's a virtual machine that is running the full Windows Phone 8.0 operating system. In other words, the operating system actually thinks it is running on a physical phone device, however it is "virtual" in the sense that Microsoft created software that mimics the phone hardware in every way. We'll be using the Phone Emulator extensively in this series as it's easier than deploying our tests to a physical phone each time we want to test the code we've written or a change we've made. You'll learn more about the features of the Phone Emulator in this series.
Use your mouse to simulate using your finger to tap the screen of the phone. You want to click on the red Quack button. If your computer is set up to hear audio, then you'll hear a duck's quack through your headset or speakers.
To stop debugging the app, click the red square button in the toolbar:
To quickly recap, in just one lesson, we've created a simple sound board app. We learned how to create a Windows Phone project, how to modify the declarative XAML code to add and configure controls. We learned how to add assets to the project and reference them in our code, and how to add event handlers to respond to certain events that are triggered by the end user. We learned how the MainPage.xaml and the MainPage.xaml.cs are related ... we'll learn more about that in the next lesson. We learned how to trigger methods of the controls to play the sound when a user taps the button. Finally, we learned about the Windows Phone emulator as a means of testing our apps in a virtual environment.
However, there's a lot to talk about ... if you're new to XAML, it's really important for you to have a solid foundation with it, so in the next lesson I want to talk about the features of XAML and build on those throughout the rest of this series. As I said at the outset, many of the lessons you learn here will transfer over to all the APIs the utilize XAML, such as the Windows Presentation Foundation and Windows Store apps.
More episodes in this series
Part 4: Introduction to XAML
Related episodes
Zack Bowling, Creator of "Bass Tuner" for Windows Phone
Sam Wronski, Creator of "Conqueror" for Windows Phone
Imran Shafiq, Founder of Dangling Concepts
Aaron Karp, Creator of Spearhead for Windows Phone
Dan Tan, Creator of "What's The" for Windows Phone
Larry Molocznik, Creator of the "I am Doing OK" app for Windows Phone
Mark Rizzo, Creator of "VoiceWake" a Cortana companion app for Windows Phone
Ben Leimberger, Creator of "Conform" for Windows Phone
David Kelley, creator of "Spell" for Windows Phone
Gonzalo Figueroa, Creator of "Disarm the Nuke" for Windows
The Discussion
Thank you your videos are extremely helpful!
the link to sources seems to be down. http://aka.ms/absbeginnerdevwp8
awesome video
@hmy93: @Playergoodi: Thanks! Hope you enjoy the rest!
@ori: It's up now. Thanks for the heads up.
thanx alot for your videos,but in a beginer in programing
can you please help me which programing language should i choose to learn for start programing for wp 8?
i own an wp8 smartphone and i really want to learn make apps for it
sry for my bad English.
hope you can help me
thank you.
@sina: Hi, I really suggest you re-watch (or review) the first video in this series where I talk extensively about the pre-requisites for this course. In a nut shell: C#.
Start here:
I couldn't play the video,what is the problem ?
Hi Bob, I dont know how to show number line code in the XAML. :D
Hey! Thank you Bob I´m from México , you know I was starting to see the videos of "windows phone 7 for abosolute Beggingers" but I found these videos and I really want to congratulete, cause I can read english but when I have to listen It´s something very complicated to me , but I don´t know how I can understand you very well ! You have many skills to teach!
Thank you again!
You can turn your line No. on this way !!
Goto "Tools" in the higher pane > "Option" a menu item available in "tools" > Then Click "Text Editor"> select "XAML" and then > "Check line Numbers" Line Number will be appearing on right side !
First of all, Thank you for simply teaching.
When i run the app, I'm getting an error message: "Deployment failed because no Windows Phone 8 phone was detected. Make sure a phone is connected and powered on."
I think it is about Hyper-V. I have problems with hardware virtualization. Fixing it is a big problem in my mind
@Karlzyffer: So, next to the green arrow (run F5) button on the toolbar, you have one of the Emulator options selected but you're getting that message? That is definitely a problem.
The emulation "just happens" ... you shouldn't have to know anything about it, or tweak it in any way. If you already have Hyper-V installed, perhaps that's getting in the way somehow? Can you try on another machine that is fresh (new install of the OS, etc.)?
I haven't got an Emulator option, only Device near green arrow with run function. I research on internet; this option needs processor that has SLAT (second level adressing tech..).((It is nonsense)) I installed Hyper-V, but my processor hasn't got SLAT, so Hyper-V platform (on windows attributes) can not be activated. I can't find or buy another machine so i have to find a way to fix this problem. But how?..
@Karlzyffer: The only thing I can think of is to get a Windows Phone 8. Your local Nokia rep might be able to loan you one for development purposes. Unfortunately, this single requirement (SLAT) will keep many people from developing Windows Phone 8 apps. Please let me know if you make any breakthroughs. I would be interested to hear if you can make it work somehow.
i'am unable to play the sound
@usaid: Do you happen to have a Dell XP SP3? There is a known issue with the Dell soundcard drivers and a specific audio codec. Which is the codec we use on the high quality version of our videos. Have you tried downloading the video file and seeing if its still an issue?
Muchas gracias, tus videos son de gran ayuda
Excuse me, where i may to download this sound?
It's a "Source code" under the video.
@Progr: grab the source code from https://aka.ms/absbeginnerdevwp8, we broke them up into groups of lessons [zip files get big when you have to copy a lot of wav files ]
Thanks.Very Clear.
Hi Bob
First of all i would like to say that you are a great teacher. I really like your way of teaching.
Coming to my problem. When i try to run the application on the emulator i get the following error.
"The Windows Phone Emulator requires Hyper-V. Your PC is missing the following pre-requisites required to run Hyper-V:
Windows 8 Professional (64-bit)"
My laptop came with pre-installed window 8 single language edition. And it is a 64bit version. Is it necessary to have a professional version of windows 8. I recently bought my laptop and i cant afford another one. Please let me knoe if there is any solution for this. Or do i have to buy the professional version of windows 8.
@Rafay: you can update the version of windows from the standard to Professional or the other option is to directly deploy onto a phone. Sorry, the emulator requires hyper-v, an emulation technology.
Hi,I was running the code at 20th min in the video and got an XamlParseException.How do i solve this?I thought ive written the same code :(
@Rui: I'd have to see the XAML. Chances are it is a simple markup mistake. This happens to everyone.
You could either post the XAML in a comment or do www.pastebin.com and post that link.
how can i parse an html File ??
and Also how can i add an element in a grid dynamically according to my element size ?
Can You help me?
@Mohamed Kamel: Hey Mohamed, we're trying to keep the questions to only what is about the video at hand. I suggest asking over on the forums at http://dev.windowsphone.com or try www.stackoverflow.com both are great sites.
Bing works as well http://www.bing.com/search?q=windows+phone+parse+html&src=IE-SearchBox&FORM=IE10SR
good videos, plain , simple and well delivered. Simple is beautiful indeed!
Why its not allowing me drag and drop ?
How to configure hyper-v is explained in the first or second video correct? I have the same problem, not letting me select emulator, however when developing for win8 using windows store template I can use the emulator, hugh smh, can anyone explain why?
I am running VS Ultimate 2012 on virtual box.
Otherwise good lessons, I'm enjoying this, the code actually works, I have had soo many problems trying to learn this.
Thanks a bunch
@Ank: drop and drop what? Controls onto the surface? Personally I strongly suggest knowing XAML markup rather than doing it via the WYSIWYG editor. You get better XAML along with XAML that can be easier ported to other platforms like WinStore
@Janice: 2nd video. it requires Win8 x64 Pro to run the emulator for the phone. WinStore is a simulator, not an emulator. It actually remote desktops into your own machine! Totally different way.
I don't believe you can run the emulator on Virtual Box as well. A VM within a VM.
The videos seem to only stream or 30 seconds and the die. The same is true for the different versions (resolutions) of the videos (all of the different lessons) from multiple locations on different machines (desktop win7, laptop win8, surfaceRT) When I do a "save as" it does the same thing.
@Scott: Just to test, I re-watched this video and I'm about 3:30 into it ... seems fine on my end (I live in Dallas, TX). Perhaps this is a regional CDN issue? If that's the case, I'd be willing to bet it would resolve itself. May I ask where in the world you are?
@BobTabor:I'm sure you are correct. I live in Houston, Tx. Since I tried it from 3 different ISP (Comcast, U-Verse, Phonoscope) I thought it might be something else. I'll give it a few days. Sounds like everything on the Channel 9 side is solid. I'll remote into a machine on the East coast and give it another try.Thanks!
Hi, great tutorials however I am getting an error saying there is no editor available and make sure the application for the file type (.wav) is installed. What do I need to do.
@George Clement: Visual Studio cannot edit a WAV file (audio file). In windows explorer, you can just use Media Player (or just double click on the file) to play it.
Hi , Thanks for the great tutorial.
I have installed SDK and tried to run the simple app as described in tutorial.
I get following exception
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.ArgumentException: Value does not fall within the expected range.
at Microsoft.Xde.Client.RdpClientInterop.IMsRdpClientNonScriptable3.set_NegotiateSecurityLayer(Boolean pfNegotiate)
at Microsoft.Xde.Client.DisplayForm.SetSecureModeOn()
at Microsoft.Xde.Client.DisplayForm.InitClientSettings()
at Microsoft.Xde.Client.DisplayForm..ctor()
at Microsoft.Xde.Client.EmulatorForm.InitDisplayForm()
at Microsoft.Xde.Client.EmulatorForm.OnActivated(EventArgs e)
at System.Windows.Forms.Form.set_Active(Boolean value)
at System.Windows.Forms.Form.WmActivate(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at Microsoft.Xde.Client.SkinnedForm.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
Assembly Version: 220.127.116.11
Win32 Version: 4.0.30319.18051 built by: FX45RTMGDR
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
Assembly Version: 188.8.131.52
Win32 Version: 8.0.9900.0
CodeBase: file:///C:/Program%20Files%20(x86)/Microsoft%20XDE/8.0/XDE.exe
Could you please advice how to fix it as I am stuck and cant progress.
- Did you just install the tooling?
- Have you restarted your computer if the installer prompted?
- Is this the code straight from our ZIP file?
Yes , I installed it and have created new blank project , trying to run without any changes.
@Mahesh: this pains me to ask as it is the most "default" question ... but since WP8's installer does do some stuff with Hyper-V, have you restarted your computer since installing?
I have done it couple of times.
Do you think its some instillation issue ?
Following are the details for my install
Microsoft Visual Studio Express 2012 for Windows Phone
Version 11.0.60610.01 Update 3
Microsoft .NET Framework
Version 4.5.50709
Installed Version: PD Express
Team Explorer for Visual Studio 2012 04937-004-0029003-02235
Microsoft Team Explorer for Visual Studio 2012
Visual Basic 2012 04937-004-0029003-02235
Microsoft Visual Basic 2012
Visual C# 2012 04937-004-0029003-02235
Microsoft Visual C# 2012
Visual C++ 2012 04937-004-0029003-02235
Microsoft Visual C++ 2012
Visual Studio 2012 Code Analysis Spell Checker 04937-004-0029003-02235
Microsoft® Visual Studio® 2012 Code Analysis Spell Checker
Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.
The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.
Windows Phone SDK 8.0 - ENU 04937-004-0029003-02235
Windows Phone SDK 8.0 - ENU
Microsoft Advertising SDK for Windows Phone 6.2.923.0
Microsoft Advertising SDK for Windows Phone
Build 6.2.923.0
Microsoft XNA Game Studio 4.0
Microsoft XNA Game Studio 4.0
Build 4.0.40906.0
NuGet Package Manager 2.0.30717.9005
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
@Mahesh: doing a quick look, it is something with Hyper-v, not totally sure what however. let me ask around
Hi ,
Have you got any updates on how to resolve the issue ?
@Mahesh: are you running this from a VM?
No , I used my HP laptop spec
HP G62-452SA Laptop, Core i3-350M 2.26GHz, 3GB RAM, 320GB HDD, 15.6" HD, DVD±RW, HDMI.
I upgraded this from Windows 7 to Windows 8 Pro.(64bit)
@Mahesh: was more of a "are you running any additional software that could conflict with Hyper-V". Can you verify the i3 you are running is SLAT. https://social.technet.microsoft.com/wiki/contents/articles/1401.hyper-v-list-of-slat-capable-cpus-for-hosts.aspx
I am using my Nokia Lumia to test directly, as I don't have Windows 8 Pro. Everything works except that I don't get the Duck.wav sound on the phone.
@Duduosun: are you 100% you stores the audio in the same directory we did and you have the file path the same? Slashes and everything. does our version work for you?
Thanx Clint, User error, yes I had spelling mistake within the path. It works fine now
Running systeminfo on my machine show following a the end
Hyper-V Requirements: A hypervisor has been detected. Features required for Hyper-V will not be displayed.
Is this ok?
@Mahesh: no you need SLAT (EPT == extended page tables)
I've never run into this issue (I've installed the tooling on a lot of computers). It could be something on your computer that is causing this. It could be something with user access privileges ... I'd suggest asking the question over on the forums at http://dev.windowsphone.com
The autocomplete feature doesn't seem to work for me. When I type Click, the "PlayAudioButton_Click" option doesn't show up...
I went to Tools -> Options -> XAML -> general, and the "Auto list members" option is grey and cannot be turned on..
Thanks for this great tuto, very helpfull.
I have used your code on Windows 7; Visual Studio 10; targeted, of course Windows OS 7.1, all compiles fine and works fine but when I click on the button on the emulator, no sound is played although the sounds fine are correctly located in the directory Assets/Audio/Animals ... any idea ?
Another question: which app Bob uses to record the videos and to appear in a small window ?
thanks in any way for any answer,
@McDomi: assuming you mean windows 8, not 7. Are you 100% you have the leading slash and entire file path the same? Does our same for this lesson work for you?
Hi Clint,
I'm running Visual Studio 2010 with SDK for windows mobile 7, all running on Windows 7 (PC) 64 bits.
Nota : I have loaded the same project into a Windows 8 (PC) 64 bits running Visual Studio 2012 and SDK for windows mobile 8 WITHOUT CHANGING A LINE OF CODE and this works fine !; I just want to test your example for windows mobile 7; I get no error during compilation, and I trace until the .Play() function but no sound is given; all is correct the sound files appear in the solution explorer (of VS2010) and I hear the sound when I double-clic on the sound file in solution explorer.
Any clue ?
@McDomi: first, it is Windows Phone, not Windows Mobile. I have to stress that fact. Next, we are trying to only answer questions that are related to the topic covered in the video. This is Windows Phone 8 material and some things will be different between Phone 7 and Phone 8 content so be warned.
So on to the code. Are you using our sample from codeplex and the link above? How are you sharing files between wp7 and wp8 in your projects? are your audio files listed as reference or content (should be content)?
Chances are it is a reference VS content or if you're 100% not using the same file, it could be a slash is missing. What I can recommend is zipping up your solution for both wp8 and wp7 and I can take a look if you can't solve this. https://absolutebeginner.codeplex.com/WorkItem/Create
@Clint: sorry for bad posting here (win 7) and the wrong name (Windows Mobile) !
I have built the code (for WP7) from scratch, step by step, following the video; I have just pickup the .wav files from your zip from codeplex.
Ok, I'll tried to post the zip of the solution for 'your investigation' if I can't solve it.
@McDomi: since you didn't use linked files, I worry they are truly not the same then. Why are you targeting phone 7 instead of 8?
For your problem, as my initial statement said, I believe it is a reference VS content or a missing slash issue but that is my blindingly guessing without looking at your stuff.
I dont know if anybody gets this error : : A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in System.Windows.ni.dll
I do the same things as in video, but the error comes from
I run the app in real phone...
Any thoughts?
An Update about the question: If I comment out the whole button, app works and duck.wave plays...
so,it means that problem comes from button...
Ideas ?
Solved it...
Width and Height: I wrote "200px" instead of "200"...aspx habit
Hi BobTabor!
Thanks for your great tutorial. I am VC++ developer, so I like to do phone app on the same. So I want to know whether it is possible to create windows phone applications in vc++. If so, what are the steps to do.
@Samet: Nice catch. I don't know I would have caught it without trial and error (removing attributes, etc.)
@WinAppy: YES YOU CAN! Use this as a starting point (or google it using Bing.com):
"C++ phone 8"
... helped me find this ...
Good series so far. Only on lesson three. I can follow everything you're doing thanks to the pause and position slider. New to C# and XAML. Reading Andrew Troelsen's book Pro C# 5.0 and the .NEW 4.5 Framework simultaneously. One thing that threw me when I loaded this first app onto my phone, a Lumia 928, (I don't have Hyper capabilities on my computer) was that the application loaded fine but when I pressed the button, no duck. I played around with the path (I was using a different one at first) with no luck. Then I noticed that you were using forward slashes instead of backslashes. Forward slashes to me are the Unix-Linux world and backslashes are the Windows world. Since Linux is nowhere to be found in this environment, why does this path use forward slashes? Once I fixed the slashes it worked fine. Now that I know what works I don't think I'll have the problem, but I would like to know why the forward slashes work here and nowhere else in Windows.
@joel: file paths are URIs in this case much like a web URL. Window Store applications work the same way. You can pull from different sources, as well, app data, isolated storage, ...
Do you have this series subtitles??I'm very supposed
I successfully installed the Windows Phone 8 SDK and also enabled Hyper-V successfully.But when I was deploying the PetSounds app on Emulator, the virtual phone displayed "Windows Phone OS is starting" and took a long time before the emulator shut itself down and I got the error message : "App deployment failed. Please try again.". I searched msdn site for it and tried everything I could from troubleshooting(defragmented, ran chkdsk utility, am not using VHD) to checking my Hyper-V virtual adapter settings but still it doesn't works. What should I do to fix this??
@thenerd: can you get the emulator up and started at all? How much RAM does your computer have?
@Clint: it has 4 GB ram...yaah the emulator starts up and shows that "Windows phone os is starting" but then it shuts down after a while...and the deploy fails..
@thenerd: Are you running in a virtualization environment?
ok, try this for me. Go into hyper-v manager, right click on your VM, and go to delete then try again.
Interesting. The sound isn't playing. I hit the break point but I don't actually hear anything.
BoB....After writing my code for petsounds when i start emulator it gives err mssg....Deployment to application of device failed..err ox80131500 pls help
M using windows 8.1 preview...
Installed Windows 8.1 Pro (64bit) in a WMware Player 6.0 on a Windows 7 Ultimate (64bit) machine. In order to get Hyper-V running, refer to http://developer.nokia.com/Community/Wiki/Windows_Phone_8_SDK_on_a_Virtual_Machine_with_Working_Emulator. Editing the *.vmx did the job for me even though the OS & SDK was already installed. Had to install VS 2012 Update 3 to resolve compatibility issues with the emulator, but now the duck is quacking :o)
@devlife3: are you 100% sure you have the file path correct? Note the first slash.
If not, upload the solution to https://absolutebeginner.codeplex.com/WorkItem/Create and i'll take a look
Very helpful
first of all thank u so much for great tutorial.
i have a problem.
when i want to insert click equal to new event handler and enter on it i get error that says: Method name 'play audio button_click_1' is not a valid language identifier.
can u please help me? what should i do?
sorry for my very bad English.
@nima: Did you compare our sample source code for this lesson against yours?
yes , i didn't find any difference!
@nima: the fact you have what you listed, something isn't correct in your XAML or your CS file. If you want, you can upload your solution to https://absolutebeginner.codeplex.com/WorkItem/Create and I will take a look
@Clint: I am not running it in a virtualization environment. Done, didn't work.
what a good videos!
I have a question:Why do you write XAML files, instead of in the design surface? With more efficiency.
Are writing XAML files really necessary?
@KenChen: I think I talk about this in the series ... probably just haven't gotten to it yet. Several reasons:
(1) I don't have to lift my hands off the keyboard ... makes me more productive than with a mouse clicking all over the place.
(2) Precision ... I can get exactly the results I want. Sometimes you *think* you've done something in the designer that you really didn't do.
(3) Most importantly, even if I did use the designer, I would want to know exactly what the designer is doing to the XAML and why. If I don't understand what's going on behind the scenes, then I'm going to hit a wall at some point in the future.
Just a work ethic developed over a long period of time. Trust me ... took me a long time to ween myself off a designer.
can we play the .mp3 files same way as we play .wav files ?
i just copied a .mp3 file in the same directory and tried to play it
e.g ".Assets/Audio/Animals/song.mp3"
but it didnt worked
@BIlal: are you sure your file path is correct? I just did a test with an MP3 on the final project and it worked fine.
For this lesson, path should have a leading slash. You have a period.
@Clint:It turns out that I didn't include the Audio folder in the solution. Always the dumb mistakes!
@Clint : i used this line of code
" Source="/Assets/Audio/Animals/10396.mp3"
and i copied the mp3 file in the folder with the rest of other animal sounds but it didnt work.
i am using VLC player for mp3 files as default. Does it have to do anything with this ?
Should i use Media Player as default ?
@Bilal: without looking more at it, I don't know. For this series, I can really only provide support for our samples. It gets really hard to support the series otherwise. I know our samples and audio files are encoded properly and are tested.
If you want, you can upload your solution to https://absolutebeginner.codeplex.com/WorkItem/Create and I will take a look when I get a chance.
Why its not allowing me to drag and drop the Audio folder from Windows Explorer to the target directory in Visual Studio's Solution Explorer?
Using the copy/paste menu options, the paste is disabled on the target directory in Visual Studio's Solution Explorer.
@PedroG: May need to unzip the file first? If that's not it, perhaps a permissions issue on your desktop? Outside of that, I'm not sure, maybe Clint has a better idea.
@PedroG: I agree with bob, I tried from my desktop and it worked, if it is from a zip file that is just opened (will say "Compressed folder tools" at the top if it is) VS won't accept the drag in.
@Bob and @Clint: I'm trying to add the Audio folder, after I've extracted the zip, of course . I'm just trying exactly the same way you have done in the vídeo Bob.
Ank added a post with the same problem, I think, at Aug 25, 2013 at 10:43 AM. He received a reply from Clint, but I think Clint missed the point then too. I don't know if Ank solved it out, but he didn't replied again.
Because I couldn't, I just copied the folder to the Assets folder of the project, and used "Include in project" option to add it. But it would be nice to be able to do the way you did. And I don't get it why you could and I can't.
So I create the project in other PC and tried again and... it works!!! I still not understand why it doesn't work in my PC.
@PedroG: I need to see what is happening and more details. Are you using VS Express or VS Pro?
Great Tutorial, but I am facing an issue here
When I press the emulator button, everything starts off well and the emulator opens up with a black screen and then displays the error
'The Windows Phone Emulator wasn't able to create the virtual machine
Couldn't change the processor of the virtual machine
Cannot assign the specified number of processors for virtual machine "....." is out of range
The range is 1 through 1 (virtual machine ID is ...................)
What should I do? This is from the Windows 8.1 Preview with VS 2012 Update 3
Great Video! Many thanks :)
the sounds must be .wave ?
Hi there,
Pardon me if I am so silly ..
Why should I add a MediaElement Control tool?
And why should I place it outside the <grid> tag ..
Is it wrong if I place it within the <grid> tag?
Also .. How to make the button as toggle?
That is like to make the button play and pause/stop?
awesome series (Y)
When I type "Click" inside the <Button> , and press return key and then press return key again on seeing the "New Event Handler", I get the following(EXACT) Error message:
Method name 'PlayAud ioButton_Click_1' is not a valid language identifier.
Please help ASAP
Thank you.
Sorry to disturb , but I figured it out myself.It was a spelling mistake in the Name attribute of the Button Hence the Visual studio created some method name according to it hence it didn't worked out.
By the way this also led to the .cs file's method not identifying the QuackMediaElement .
@nima I guess u must have had the same problem!!!
a first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in system.windows.ni.dll
whats solution?
@danz: Chances are somewhere in your xaml you either misspelled something or used the incorrect casing. XAML, just like C# is a case sensitive language
@Sugan: use a ToggleButton instead of just a button. You'll want to use different events than Click, Checked and Unchecked
@mmm011: awesome you fixed it! Programming typically will involve a lot of debugging. Don't forget we do have full source code samples for every sample!
@Sugan: it isn't wrong if you place it outside the Grid or in the grid for this sample. If the Media Element's source is a video, the order and playment within the XAML could matter then.
@sabra: audio file can be a MP3. It must be a format the media element can understand. For this sample, we just decided on WAV files so we could reuse them in other projects if needed
@Padmanabhan K: what order did you install the windows phone tooling and VS update 3? There is a known documented issue with 8.1 Preview and WinPhone tooling. You need to install VS Update 3 after you install WP tooling. This is documented on the download page for the SDK.
Hi everyone
first of all ,a big thank's for Bob for this series ,really great work man
I just have a problem when i'm trying to emulate any code
every time i tried to emulate i have this code as an error Error 1 0x80131500 .
notes :i have an intel i3 380m processor ,and the hyper V is enabled in the bios part,ans i use windows 8.1 64 bits .
thank you in advance
@faker62342: you need to install Visual Studio 2012 Update 3 after installing the developer tools to get it to work under Win8.1
So I'm trying to mess around with the knowledge I got from this video; I want to have my app make a sound when the app begins. What I tried doing was to set an event handler for when the MainPage was loaded call a method that does MySound.Play(). Turns out this works about 60% of the time, I'm so confused! Why doesn't this work all the time (or not at all). My app just creates a WebBrowser that then navigates to a specified webpage.
@Shayne: Could you show us some code ... the entire event method where you're attempting to play the sound? I'm betting you're relying on an event to fire that doesn't ALWAYS fire ... some events around re-activation (Launch, Navigate Away, Back, Close, Launch, Close, etc.) only happen in certain scenarios.
@Shayne: instead of playing on the page load event, play on media source loaded. I think you are hitting a race condition.
When i'm running my app on Emulator i am getting an error.That says..
The windows phone emulator wasn't able to connect to the window phone operating system:
The emulator couldn't determine the host IP address,which is used to communicate with the gust virtual machine.
Some functionality may be disabled.
How can i resolve this problem?
@dsrajapaksa: are you running anything special like proxies, in a VM, or special networking stuff?
If this is a fresh install, have you restarted your computer?
How do you add a Stop button to stop any of the sounds from playing?
@ChuckJ: add in a new button (or additional logic to verify the current state of the media element) and just do QuackMediaElement.Stop(); or QuackMediaElement.Pause();
@Clint: Thanks. To be more clear, how about a button that would stop ANY mediaelement that may be playing within the app?
Hi Bob and friends,I am searching how to enable XAML Statement Completion which is default unselected and uneditable(INTELLISENSE)
for xaml and activated for C#.But i see you are using the same for XAML in Express 2012 for Windows Phone.Can you plz guide me how to enable it?
I went to Tool->options->Text Editor and then XAML or C#
I was able to resolve this error by updating the VS edition Update 4 being the latest.
These tutorials are amazing and perfect for beginners like me :) I have started developing but I would like to know if you will be able to help me in developing mobile apps related to "sailing schedules" for Windows 8 Phone. Thanks a million :)
This series will definitely be helpful. If you're asking me personally whether I can help you build your app ... I'm sorry, but I'm booked solid right now. Thank you for your interest, though and good luck!
Hi Bob can you help please I am following your instructions but I am having a problem with
5. Add a wav file as an asset to the project
as I cannot drag the audio folder into the assets area on the SDK. It appears that I cannot add wav files.
Can you advise what may be the problem thanks Andy
@Robsoan: are you trying to add this from a zip file? extract first then try to drag them in.
I am soooooooo happppyyyyyyyy!!!!!!!!!!! I have started developing...... I just can't express how excited I am to develop these apps.. THANK YOU SOOOOOO MUCH BOB & CLINT :)
Hi Bob, I have a problem look forward to your help.
I have absolutely applies in your way (create Button, MediaElement, the Click event ...)
I have created 10 Click play sound! and it was only 6 the first run, 4 the latter can not emit sound when I click.
I desperately need your help. Sincerely grateful!
@Rani: not 100% sure what you're trying to do here. If you want, you can upload your solution to https://absolutebeginner.codeplex.com/WorkItem/Create and I will take a look when I get a chance. This is outside the scope of our lesson here but will do a once over.
My gut says you're jumping a bit off the deep end and wanting to do something more complex without understanding how the event life cycle works on a few things. This is where debugging comes in
@Clint : thank very much ^_^
Thank you so much . This tutorial is really helpful :)
Whenever I try to run my code, the Windows Phone 8 Emulator tells me that it cannot run as it needs Windows 8 Professional (64 bit) to execute. Currently I am running Windows 8.1 Single Language (64 bit) upgraded from Windows 8 Single Language 64 bit(It came bundled with my HP Pavilion g6 Laptop). Also I have Hardware Virtualization enabled and my laptop is SLAT supported.
Please do help me out in fixing this problem.
Thank You.
@Kaustabh Datta Choudhury: you need windows 8/8.1 professional or better to use the emulator. You can still deploy to a phone directly.
Hyper-V is what is required for the emulator and only comes the Professional edition or better. You should be able upgrade your edition to professional but it does cost some money to do so.
Bob/Clint, Greetings from the UK. Truly impressed with the series and the fact that you guys are still responding to these comments. Also, documenting the content of the videos makes it great reference material and is helping me produce my first WP8 app. Thanks.
Just wanted to share a small finding. Fractional numbers seem to reduce the volume of a .wav MediaElement on an exponential scale. E.g. Volume = "0.9" seems to reduce volume by about a half and "0.8" by half again. So setting volume to "0.5" (as I did initially) might mean you can't actually hear it at all (as I couldn't)
Took a bit of head-scratching to figure it out so I thought it might help someone else.
Br, Nick
@onimoD: is this emulator or phone? You have to remember, your phone's base volume is also taken in there. So what seems like a small drop chances are could be much larger of a total drop depending if the phone's volume was set to.
My opinion is to always just set the volume to a media element to 1 and let the end user adjust as needed using their volume.
Hi, I'm very interested in this series! thank you a lot!!!
Can I make an app same same your demo about English alphabet for children?
sorry for my bad English.
@keluhanh: sure, we provided the source code as a good starting off point.
@Clint: This was using my phone (L920) with the phone's volume set to max. My first thought was that there was something wrong with the wav so it was a while before I tried a volume setting other than "1" (which worked) and "0.5" (which appeared not to).
I hear what you're saying about letting the user adjust as needed. This is for an app that is likely to be used in quite areas so I was trying to make this 'alert' sound more subtle. You are right of course though. I'll let the user control the volume and even give them the chance to turn sound off and have a haptic response only.
Off to Google 'WP8 Haptics' now.
I am really sorry but i cant find from where to download the Assets required for the PetSounds project. Please provide me with the links.
@Soumya Ranjan Panda: the like is at the top of the page to the codeplex page for the series with all the material like sounds in zip files . Since this is lesson 3, get the lessons 1-10 zip file.
I've discovered a bug but I'm not sure if it's hardware or software. With both your source code and the app I'm developing separately, I find that if I leave the app idle long enough for the screen to time out, the sounds don't play after the phone is re-awakened. I haven't found this with any other apps or games installed on the phone. Any ideas as to why this is happening? I tried changing the time-out setting from 3mins to 30secs and it makes no difference.
@onimoD: you have to deal with resetting the source on tombstoning. http://developer.nokia.com/Community/Wiki/Resuming_streaming_audio_from_Dormant/Tombstone_state_in_Windows_Phone
we intentionally skip over a few things as they are far more advanced topics
@Clint: That's cool. Thanks for the pointer.
When I run PetSounds project of this very same video I got this error:
A specified communication resource (port) is already in use by another application.
I tried:
1) Restarting VS 2012 and my computer but it didn't work.
2) Tried solutions via Google (e.g. http://goo.gl/RjB84l) but it doesn't work for me.
Please help me!
Hello Bob, My computer doesn't support Second Level Address Translation (SLAT) does that mean that I cannot develop windows 8 apps ? The emulator won't run ..is there a way to enable SLAT on my computer?
Many thanks @Bob for such a helpful and clear tutorial. I started to learn WP programming by your this series. It is awesome.
@kushtrim: you can, you just need a physical phone to deploy the application to.
Hi,sir. I just installed WP8 SDK, and I can also open a template of WP projects in Visual Studio, but when I'm trying to create a new WP project, no such options show up, only one choice: install WP8 SDK. So now I can only practise coding in a template. I need ur help, thanks a lot.
BTW, in this video I do the same like u guys do: put in Click="", but VS doesn't show a New Event Handler choice for me.
Need ur reply, thanks again.
@totti10hj: this goes through visual studio 2012. Sounds like you have Visual Studio 2013 if you are talking about the item above. If you launch that, it will install properly for 2013.
for the new event handler, do you have resharper or another tool installed? I just tried with resharper disabled and it came up right away.
If you miss the prompt for wiring up the event handlers automattically, you can hit control-space to get the context menu to come up with the options.
any body help me please when I run the emulator it runs but my app dosnt run a dialog box appears that says application takes longer time than expected is this a machine problem ? am using dell core i3
@ahsan123: I would recommend starting over, retracing your steps. Nothing we've done so far should have killed the emulator. Create a new blank Grid App template app and don't add any code -- just see if you can get it to work without that issue. At least you can rule out the machine issue.
Well, I'm an iOS developer, I become interested to learn making Windows apps after i watched this video, it seems quiet simple and smooth!
Thanks Bob, keep the posting up.
@BobTabor:thanx bob fo the rep i start a new project and run it without any modification but problem is still same emulator runs but app doesnt and same dialog box appears 'remote operation is taking longer than expected' and this dialog box coninues it never ends am using windows 8 pro 64bit del core i3.can u tell me how to enable hyper v on this system ???but i thing it is enabled cuz sdk installed smmothly without any error message !!!
Hi there i wanted to shoe toast prompt when my app is not running,any help with that?
@Rida221: Unfortunately, I don't think we cover that in this series. There are plenty of videos on Microsoft's sites and else where that cover that sort of thing. Good luck!
Sir In debugging option only Device is Showing instead of any option of emulator.I cannot run the app.
Hey Bob please help me here....I am totally stuck.
When I start the project and try to run using emulator,the emulator shows and then it shows Windows phone OS is loading...
I waited for around 15-20 min,then also same.So I checked whether it is loading in Hyper V or not...there I saw that OS was already loaded.
So why it has not loaded in VS...please help.When I close emulator in VS,it shows Deployment error
Hey Bob please help me here :(
my CPU don't support Hyper-Threading & Virtualization Technology :((
i can't buy another machine,,plz help me :(
Here are the screenshots of my problem mentioned above....
Thank you Bob,I find this video very useful!But there is some trouble with my environment..
The grammer highlighting function with .xaml file seems doesn't work!I use Microsoft Visual Studio Express 2012 for Windows Phone,and the .xaml file is set to open with "XAML UI Designer",but there is no grammer highlighting there,despite the Intelli is still working.Could you tell me how to fix this? Thank you!
Hi Bob, i'm Brazilian and i think your classes are very Helpful. I didn't find the duck.wav to download!
Could you send it for me? Thanks!
I want to show your videos in my School's computer club
But the comps there have no internet :(
Any way to install Studio 2012 without an internet connection (Without having to ... enter the registration code and all after installing)
:Its really upsetting to me that, at the beginning of this series, we were told that all we needed was windows 8 64 bit, and that we did NOT need professional, and everything would work. SO.. i buy windows 8 regular to save money, and come to find out i really do need windows 8 pro if i want to use the emulator. Perhaps next time, more homework should be done so your students know EXACTLY what they need before they take their time watching the videos and spending money. All complaints aside, the teaching itself is quality stuff, and I will probably continue to follow along, despite not being able to test any of my apps.
@Rohit: Your computer can't support the emulator / Hyper-V. Sorry, but you're out of luck.
@Akhil Menon: Sorry, I have no idea.
@Saeed: Sorry, you're out of luck.
@Li Yu: You probably need more RAM. You don't need Intellisense, but it is helpful.
@lmelikardi: Did you download the link at the very top of this page (under the video) that says "Source Code"? I'm pretty sure it's in there.
@Ashish: I'm pretty sure you can download the ISO and burn to DVD. Go to the download page.
@Darkrender: I agree ... In fact from now on, I'm not going to talk about installing the tools. That will be someone else's job. However, if you look at the previous page, I did edit the TEXT version of the video with my updated advice -- i.e., that you DID in fact need the Pro version IF you wanted the Emulator.
Also, there were extensive discussions through the conversation thread below that video. I had already spent a couple hundred dollars on Windows 8 licenses to figure all of this out, so I did NOT purchase the non-Pro version myself to try out every possible permutation. My advice, when there's a mere $30 difference, always choose Pro ... regardless of the tool / OS / etc.
Why do you prefer using C# instead of visual basic?
@surfacepro2boy: I've recently finished a Visual Basic course for Microsoft Virtual Academy. I tweeted something to the effect that VB has gotten a bad rap. It was fun, and I forgot how much I enjoyed it. I felt productive. So, why NOT VB?
That's a good question to ask, and a hard question to answer. It definitely reads better to a beginner than, say, C# or JavaScript (or C or C++ or ...)
I think it comes down to this ... in the late 90's there was a stigma with being a VB programmer ... other developers didn't take you seriously. The fact of the matter is that VB was so easy to write that you could easily build really poorly architected applications quickly. I think it was a cultural thing ... C# was meant to draw the Java developer crowd (or at least, stop the attrition), but to some extent it cannibalized the VB developer who wanted to differentiate themselves from the VB developers who didn't care about code quality, OOP, patterns, etc.
Now, almost all articles for any given topic written on MSDN, forums, videos, etc. use C#. The main reason I would recommend C# is (a ) better community support from developers who are constantly wanting to stay abreast of the latest and greatest changes in .NET and development in general, and (b) since those people are generally regarded as the experienced / senior developers in most companies, they drive architectural spikes for new project initiatives and pick C#. So, as a result, most jobs are looking for C# developers.
But C#, VB ... it all is just IL when compiled to a .NET Assembly. So in the end, with minor exceptions, it doesn't really matter. You can mix and match languages within a solution. But from a pragmatic perspective (and this is just my opinion, definitely NOT Microsoft's position on this matter) C# is what you should be learning if you hope to work in an enterprise.
If you're a hobbyist and could care less about what other's think about your choice of language, AND if you don't mind the fact that there are fewer books with VB examples, then knock yourself out.
Personally, there's only so much time in the day and only so much money in the budget. Recording videos is hard work, despite how it might look. I could barely get this series out the door much less turn around and do it again. :)
Learn C# ... it's not hard. You'll be glad you did. It will make you a better VB programmer, and vice versa.
When I open my program in the emulator, Visual Studio automatically opens the "MainPage.g.i.cs" tab ...
On my emulator, it just gets a clock (which should be the default WP) and no longer opens the application ...
Before my problem was with the sound, now the problem is to open my application ...
Any suggestions?
--- I am Brazilian, I do not know English, was translated by Google Translate ---
@Gabriel Hamerski: Sorry, I have absolutely no idea what the problem could be. Try asking here:
Hi BobTabor !
this is great video for me but i have a problem. Follow your tutorial I have created 12 Button, 12 MediaElement. No have any error but only 6 on 12 button active. I don't think my code is wrong.
Please ! help me
@AnPham: Have you downloaded MY source code and tried it?
Hi Bob Tabor thanks this and others videos. I'm from Turkey, and My english is a little bad. Difficult to find in my own language resources but I well understood. Thank you again.
Sir,where do i get petsounds?I couldnt able to find them..please provide link to download petsounds..
@Archana: Ctrl + F on this page ... Search for "Source code" ... there's a link. The files you need are (or should be) in there. Good luck!
Hi! my MediaElement doesn't quack :( i've tried to play back an mp3 file from an url (after reading this post) and it worked. What am i messing up?
EDIT: Okay I've figured it out, i was using "\" instead of "/" in the path for the wav file.
@BobTabor: Thanks for the great work you do. I've been a lifetime subscriber to your learnvisualstudio.net site close to day one.
I've been helping my 10 year old son learn C# and we both work through your videos together. I've got both windows phone 7 & 8. We didn't have the money to go out and buy another phone or computer (neither of ours supports SLAT), so I had him use the Win 7 phone and I used my 8.
We both had audio issues playing, however I tracked mine down to missing the "s" in "Animals" so once I fixed the path I was good to go.
We however cannot identify why his will not play audio. I realize this is a WP8 course, but in searching I have not found a reason why it would not play, so I was hoping you might have some idea.
What can I do to open the camera on my app?
Hello Bob Thanks !
How can i play this sound in a loop ??
@rictersmith: Did you ever figure this out? Perhaps the WP7 doesn't support the same API? Did you get compilation errors?
@khanh le: Do you want to control the camera OR allow the user to select a photo from the camera / photo picker thingy?
@Daniyal: Have you attempted writing a loop in C# that continues to call the play method?
Hi Bob,
Is there a way we can make the app
1. Wait
2. Exit
without clicking any button. Say I want to wait for a few seconds after the duck sound is played and then close the app. How can I implement such a thing. We do not have thread.Sleep() in WP8.1.. so how can we accomplish this?
Hii bob,
When I open my program in the emulator, there is some error were occuring like
Error message: "ensure that the target device screen is unlocked"
i dont no wat to do can u help me solve tis
Hi bob,
Greetings from Perú,
Can you tell me what is the code for changing the font's color?
Thanks for sharing your knowdlege :-)
A very good introduction!
sir , when i run my app in visual studio .. i am facing some problem .....like " the emulator is couldn't determine the host ip address, which is used to communicate with the guest virtual machine " .....plzzz sit give me the solution ....i have reinstalled the visual studio .then also the same problem ......
sorry ...for my poor english
Hello Bob,
when i run this code i have these 2 follow errors:
1- Error 11 Could not copy "obj\Debug\PetSound.dll" to "Bin\Debug\PetSound.dll". Exceeded retry count of 10. Failed. PetSound
2- Error 12 Unable to copy file "obj\Debug\PetSound.dll" to "Bin\Debug\PetSound.dll". The process cannot access the file 'Bin\Debug\PetSound.dll' because it is being used by another process. PetSound
Can u help me with this ??
Sounds not playing,its showing 2 errors in lines 8 and 26 which we didn't change at all.
I am having an issue with the XAML view in my VS Express 2012.
*.xaml files are loaded but they appear as plain text (black-on-white). Intellisense works fine. Also syntax errors are underlined. Everything seems fine except the colors.
I have tried changing the setting/reset to defaults in Tools > Options> Environment. Also Changed the settings in Tools > Options > Text Editor > XAML
Also right clicked on .XAML file in the Solution explorer and clicked Open With, to select different editors.
But all these make no difference. Any suggestions? The formatting of .CS files are correct. Its only XAML files that is creating this nuisance.
please please please
how can i always initiate a new instance when the app is in dormant ?
thanks a lot
Thanks but as I download the subtitles in spanish?
Hi, I am unable to play the sound.
I have done everything according to the video.
I am using MSVS2010 with Silverlight Application Development for Windows Phone 7.1.
Warnings{1}:Project does not support paths relative to the root application directory. Remove the leading '/' qualifier from the'/Assets/Audio/Animals/Duck.wav' path to correct the problem.
I removed the leading '/' qualifier.. yet no sound is played.
Hi Bob,
Thanks for your videos. Really its very helpful for beginners like me. The audio is playing well when we give the audio file is in the Assets or any other folder in the project. But how to give the source for the mediaelement for the remote url like "http://fileraja.com/tamil/A/Alaipayuthey/Pachchai_Nirame-VmusiQ.Com.mp3" on the button click?? Please provide me a solution. Thanks in advance.
hi Bob tabor,
its fantastic job to providing video tutorials wp-8....
but i have 1 question .
1. how i install wp8 sdk in win 7 32bit, is it impossible? because i dont want to format.
Hi Bob,
I am not able to copy the audio file into the assets by drag and drop.
I did exactly the way you showed in the vedio.
hi please show me how to make dictionary for windows phone 8.1 by video
Awesome Video ...The enthu with which you teach us motivates people like us to learn more and more..
All ur videos tht I followed were simply awesome n vry vivid.
I jus wanted to know if we could play any other format thn the wav format.I tried using the mp3 format but the emulator could not play it.I got the remaining thngs in the video.
only if u could help me with ths..thnku.
Thank you for this wonderful series,i have completed the entire series....and after seeing the codes i was able to create my own version of SoundBoard.....Thanks a lot
While i am debugging this project to run it then its give me error that is "Deployment failed because no Windows Phone 8 phone was detected. Make sure a phone is connected and powered on." i think this is because emulator is not installed in machine. but Could you help me out to solve this problem. and also provide me a link from where i can download windows phone emulator. i have already installed windows 8 sdk
@BobTabor:Hi Bob, first of all nice tutorial. But I have this Hyper-V problem. I can't run it. It is saying that you have to activate Hyper-V. I have AMD A8 6500 dual core processor. I checked the BIOS but I don't see any options to activate the hyper threading. How to activate this thing? Please help me out I can't do anything until thing works out!!
Hi Bob,
Thanks for your video and tutorial. I tried myself with the same code mentioned above, but in my case the when I click on the button it does play the file. I just wondered if there is any setting in the emulator is required.
Hi Bob,
Thanks for your video and tutorial. I tried myself with the same code mentioned above, but in my case the when I click on the button it does play the file. I just wondered if there is any setting in the emulator is required.
Hi, I have a problem that i cant update/install my windows. I currently using windows 7. I recently complete windows phone 7 series.
is it possible to learn this series on windows 7?
any difference between window phone 7 series and windows phone 8 series?
Thanx sir for your greate video.I have installed vs2013 express for web and window 7 which sdk i should installed for the same
hello bob..thanks for the great teaching stuff..however m stuck at the beginning..
m unable to drag and drop folder to the assets..it just doesnt add to the assets..y so..
if anyone can hepout...
@vikas rawat: got the answer here itself..>> http://expectedexception.wordpress.com/2011/04/27/cant-drag-and-drop-files-to-visual-studio-editor/
thanks anyways.. :)
thanx for worderfull tutorial
Has anyone an idea where I can get the assets ?
I just can't find an link to them.
@John: Top of the page, right below the video... (or here https://aka.ms/absbeginnerdevwp8 )
Hi BOB !when I run the code in Windows phone sdk visual studio express 2012 then I got a deploy error message(0x80131500) and there's no description of this error .Will you please tell me What can I do??
@asfend: Google (in this case) is your friend:
Read the selected answer (green check mark)


text:
NH judge denies motion to dismiss sexual assault charges against former Air Force sergeant
NASHUA, N.H. (AP) � A retired U.S. Air Force sergeant remains in jail after his motion to dismiss sexual assault charges against him was denied.
Robert Joseph Manship, formerly of Hudson, N.H., is charged with felony sexual assault on a girl in the 1990s when she was under 13.
Manship is thought to have fled the country after Hudson police questioned him in 1995 about the assaults, which allegedly took place in Hudson and on Air Force bases.
He was arrested in August by authorities in the Philippines, where he was living and collecting Air Force pension payments, and brought back to the U.S.
The Nashua Telegraph (http://bit.ly/YBmC6o ) reported that a judge on Thursday denied Manship's motion to dismiss the charges.
Jury selection for Manship's trial is scheduled to begin Jan. 7.

subset: commoncrawl


text:
Teacher resources and professional development across the curriculum
Teacher professional development and classroom resources across the curriculum
Video Summary
The video for this session examines word study and explicit fluency instruction in the primary grades. Dr. Jeanne R. Paratore's lecture reviews the four foundational elements of emergent literacy, the principles of phonics instruction, and the development of accuracy and fluency. The workshop participants then watch a set of classroom excerpts that illustrate Dr. Paratore's lecture. In the final activity, workshop participants analyze a phonics lesson in terms of the research presented in her lecture. The ensuing discussion highlights the controversies around effective phonics instruction.
© 2003 WGBH Educational Foundation. All rights reserved.
© Annenberg Foundation 2017. All rights reserved. Legal Policy


text:
Ask John
A player injured while taking the field, goals from a mark and English players in Super Rugby
John Griffiths
March 29, 2010
Andy Goode is one of three England Test players to play Super Rugby © Getty Images
Welcome to the latest edition of Ask John where renowned rugby historian John Griffiths will answer any rugby-related query you have!
So, if there's something you've always wanted to know about the game we love but didn't know who to ask, or you think you can stump our expert - then get involved by sending us a question.
In this edition John answers questions on the ball going dead from a drop-goal, goals from a mark, a player injured while taking the field and English players in Super Rugby.
I have long been baffled about exactly how players formerly scored "goals from a mark". Can you explain this please? My guess is a player could claim a mark and then take a drop kick at goal? Or could they take a place kick? Was it possible at the time to take a mark anywhere on the field, or only in your own half? Paul Marshall, New Zealand
Until 1977, a mark or fair catch could be claimed anywhere in the field of play. It could be claimed from a kick, throw forward or knock-on provided the catcher made a mark with his heel at the place where he made his catch.
The resulting free kick could be taken with a place-kick, a drop-kick or a punt, but a goal from a mark could only be scored by kicking the ball over the crossbar from a place-kick or drop-kick.
The defending team could stand anywhere up to the mark, meaning that the kicker had to retreat in order to make his kick. A mark made in a player's in-goal was deemed to have been made on his goal-line. Moreover, once the catcher offered to kick, the opposing side could charge.
The kick had to be taken by the player who had claimed the mark, though very early in the game's history it was possible for the kick to be taken by another member of the catcher's team.
What is the law that states that a kick in general play that goes dead in goal comes back for a scrum from where it is kicked, yet an attempt at a field goal (dropped goal) that goes dead in goal is restarted with a 22 drop out? Warren Stahlhut, Australia
Law 22.8, Ball kicked dead through in-goal, is the relevant rule. It states:
If a team kicks the ball through their opponents' in-goal into touch-in-goal or on or over the dead-ball-line, except by an unsuccessful kick at goal or attempted dropped goal, the defending team has two choices: to have a drop-out (on the 22-metre line) or to have a scrum at the place where the ball was kicked and they throw in.
So the scrum option is not available to the defending side when a kick from a penalty or field goal attempt has been made.
With regard to Andy Goode's short term contract with the Sharks I was wondering how many other England internationals have appeared in the Super 10/12/14 over the years? It does seem like quite an exclusive club! Tim Skepper, England
As you say, it is an exclusive club. Only three England Test players preceded Andy Goode. Julian White played one match as a replacement for the Canterbury Crusaders while playing with Hawke's Bay in 1997. He was called into the Crusaders' squad to cover for injured players and made his one appearance off the bench in a 26-26 draw with Natal in Christchurch.
Fellow England prop, Kevin Yates, made 19 appearances for the Hurricanes between 2000 and 2001. Another Hurricane, Riki Flutey, played 38 times between 2002 and 2005 before joining Wasps and qualifying for England on residency. Yates, like Andy Goode, had gained England experience before appearing in Super Rugby.
Who broke his ankle while running onto the pitch for an international match? Lorcan Howe, Bermuda
The player in mind is probably Jean Salut, a blond flanker of Russian ancestry who played for France when they won their first Grand Slam in 1968.
Picked to play against Scotland in Paris in France's opening Five Nations match of 1969, he featured alongside captain Christian Carrère on the official team photograph taken half-an-hour before kick-off, but twisted his ankle in the dressing room warming up. He was immediately given a pain-killing injection and prepared to take the field.
Then, as he was running onto the pitch at Stade Colombes, he went over on his ankle on the steps leading up from the tunnel to the field and fell heavily to ground. He was immediately withdrawn and France completely reorganised their pack.
They called up Jean Iraçabal as loose-head prop, moved original loose-head selection Jean-Michel Esponda to tight-head, transferred tight-head Michel Lasserre into the second-row; moved the original second-row Benoit Dauga to No.8 where Walter Spanghero had been due to appear, and finally plugged Salut's role on the side of the scrum with Spanghero.
So there were effectively five changes made to the side between leaving the dressing room and kick-off. As the late Clem Thomas told his readers in the Observer the next day, "Only the French would make a change of such complexity."
Scotland beat the Grand Slam champions 6-3, their skipper Jim Telfer scoring a late try. Salut recovered sufficiently to take the field against Ireland a fortnight later, but after playing in another French defeat never again appeared for his country.
Is there any player to represent more than two countries at separate World Cup tournaments? I think Jamie Joseph has represented two, (NZ & Japan). I also thought he played for the USA but maybe only in qualifying? Henry Cripps, England
No player has gone to Rugby World Cup finals tournaments for three countries. Jamie Joseph did so twice, with New Zealand in 1995 and Japan in 1999, but never represented the US Eagles at Test level.
Others who went to Finals tournaments with two different countries were:
Graeme Bachop - New Zealand 1991 and 1995; Japan 1999
How many players have been capped for three countries? Paul Johns, New Zealand
Excluding additional appearances for combinations (such as the British & Irish Lions, the South American Jaguars and the Pacific Islanders), the only known example of a player who has represented three different nations in senior 15-a-side international rugby is Enrique ("Topo") Rodriguez.
He played for Argentina between 1979 and 1983, for Australia from 1984 to 1987 and tells us that he also played for Tahiti in a one-off Test against France in Papeete on July 13 1981 (for which France did not award caps). In 2000, the IRB introduced a new qualification ruling that prevented players appearing for more than one country.
© Scrum.com
Communication error please reload the page.


text:
Aiken Regional Medical Centers
One of the nations largest and most respected hospital companies, Universal Health Services, Inc. (UHS)* has built an impressive record of achievement and performance. Steadily growing from a startup to an esteemed Fortune 500 corporation, UHS today has annual revenue nearing $10 billion. In 2017, UHS was recognized as one of the Worlds Most Admired Companies by Fortune; ranked #276 on the Fortune 500, and listed #275 in Forbes inaugural ranking of Americas Top 500 Public Companies.
Our operating philosophy is as effective today as it was 40 years ago: Build or acquire high quality hospitals in rapidly growing markets, invest in the people and equipment needed to allow each facility to thrive, and become the leading healthcare provider in each community we serve.
Headquartered in King of Prussia, PA, UHS has more than 81,000 employees and through its subsidiaries operates more than 320 acute care hospitals, behavioral health facilities and ambulatory centers in the United States, Puerto Rico, the U.S. Virgin Islands and the United Kingdom.
Mission Statement: To provide superior quality healthcare services that: PATIENTS recommend to family and friends, PHYSICIANS prefer for their patients, PURCHASERS select for their clients, EMPLOYEES are proud of, and INVESTORS seek for long-term returns.
Aiken Regional Medical Centers
Aiken Regional Medical Centers, located in Aiken, South Carolina, is a 259-bed acute care facility providing quality healthcare to the residents of Aiken and surrounding communities. Aiken Regional Medical Centers has been ranked a top hospital in South Carolina by the Carolina Center for Medical Excellence for its treatment of heart attack, heart failure and pneumonia. Services provided at the hospital include emergency medical care, orthopedic surgeries, maternity, and behavioral health services.
Aiken Regional Medical Centers currently has an opening for a Staff Recruiter. The position is responsible for planning, organizing, and directing of associate recruitment and selection processes for hospital personnel and Aiken Professional Association. This position will serve as a vital member of the Human Resources department and will assist in developing and maintaining a proactive recruitment process consistent with the hospitals strategic vision.
Requirements include:
Bachelors degree in Human Resources Mgmt or related field, or 5+ years of Human Resources experience
Previous Human Resources experience required; recruitment experience in a hospital setting preferred
PHR certification helpful
Excellent communication, organization, and customer service skills
Knowledge of effective interviewing techniques
Proficiency in Microsoft Office applications
Apply to this Job
Send to a Friend
Full Time
Day Shift


text:
U.S. Equal Employment
Opportunity Commission
Meeting of February 15, 2012 - Unlawful Discrimination Against Pregnant Workers and Workers with Caregiving Responsibilities
Good morning. I am very pleased to be here today to discuss the important issue of unlawful discrimination against pregnant workers and workers with caregiving responsibilities.
Since 1983, the Work and Family Project of the Legal Aid Society-Employment Law Center has advocated to protect the employment rights of low-wage workers who are at risk of losing their jobs because of pregnancy or caregiving responsibilities. In addition to representing clients in litigation, we also staff a toll-free Work and Family Helpline, and provide advice and counsel to workers every day who face challenges on the job due to pregnancy, childbirth, or the need to care for an ill family member. Most of our clients live paycheck to paycheck. Many are single parents who work inflexible jobs while caring for children and elderly parents. When these workers' rights are denied, they face devastating consequences to their health and well-being and financial security.
Their stories include the following:
Pregnancy and Caregiver Discrimination Against Low-Wage Workers
Unfortunately, the above stories are far too common. Complaints of pregnancy discrimination increased nearly 65 percent from 1992 to 2007, and complaints by women of color in particular rose dramatically.1
Our office, too, has seen a significant increase in the number of poor workers seeking assistance since the start of the economic downturn. On average, we have received approximately 1,000 calls per year on work and family issues alone—unprecedented numbers.
Following are some of the trends that emerge from these calls and our case files.
1. Hostility to pregnant women in low-wage jobs is often blatant.
Although federal and state laws forbidding pregnancy discrimination have been in effect for over 30 years, pregnancy discrimination against low-wage workers persists and frequently remains blatant. Indeed, we have heard from countless women who were fired immediately after announcing their pregnancy, and whose employers expressly told them that pregnancy was the reason for their discharge.
Pregnancy-related harassment is also commonplace in low-wage workplaces, with employers making offensive remarks about pregnant women, asking intrusive questions about workers' sex lives and childrearing plans, and unduly criticizing women's work performance following disclosure of pregnancy.
2. Low-wage pregnant women are often forced to take unpaid leave against their will, based on employers' unfounded assumptions about their ability to work.
In recent years, our office has observed an increase in one form of pregnancy discrimination in particular: after a woman discloses that she is expecting a baby, her employer places her on an involuntary unpaid leave for the remainder of her pregnancy based on the assumption that she can no longer safely perform her job—even when there is no medical need for leave. Often this action follows on the heels of a woman's request for a modest workplace accommodation.
Frequently, an employer forces a woman to take leave early on in pregnancy, causing her to exhaust all leave time long before giving birth. Then, at the conclusion of the allowable leave period, the employer fires the woman for not being able to return to work.
3. Low-wage pregnant women are frequently denied reasonable accommodations that would enable them to keep working while maintaining a healthy pregnancy.
Another common form of pregnancy discrimination against low-wage workers involves refusing to grant doctor-advised workplace accommodations. For example, a pregnant cashier may need to sit on a stool rather than stand on her feet for 8 hours a day. Other examples include:
Accommodations may be necessary for a safe, healthy pregnancy. The modifications needed by pregnant women are often minimal, are time-limited by definition, and are cost-effective for employers—allowing women to remain productive workers throughout their pregnancy. Yet these requests are routinely denied, forcing women to choose between their health and their job.
4. Low-wage workers are often denied medically necessary leaves for pregnancy or childbirth, or are denied reinstatement upon their return.
Some amount of time off is medically necessary for all women who give birth. Health care providers typically recommend that pregnant women remain on leave for 6 weeks post-birth, or 8 weeks post-birth in the case of a C-section. Women may need intermittent time off for prenatal care, and may be advised to begin leave before childbirth as well.
Additional time off may be necessary if a woman experiences severe morning sickness, is advised to go on bed-rest for pre-term labor, or has other pregnancy-related disabilities. Likewise, women may need extended leave to recover from childbirth-related conditions such as post-partum depression.
The Family and Medical Leave Act (FMLA) provides eligible workers the right to job-protected time off for pregnancy-related conditions and childbirth, and requires continuation of health benefits. However, a significant minority of employers are not in basic compliance with the mandates of the Act.3 Furthermore, because of the law's stringent eligibility requirements, only about half the workforce is covered, and low-wage workers are disproportionately excluded from the law's protections.4 Because the leave is unpaid, many low-income workers simply cannot afford to take it. The vast majority of low-wage employees lack access to even a single paid sick day for short-term illnesses or to care for an ill family member.5
As a result, low-wage workers frequently are denied essential leave, their leave is cut short, or they are retaliated against for taking necessary time off. The result is that far too many vulnerable workers lose their jobs and health insurance precisely when they need them most—when they are having a baby or dealing with a family medical crisis.
5. In low-wage workplaces, there is widespread miscommunication and misinformation about family and medical leave, accommodation, and anti-discrimination protections.
Federal and state family medical leave, accommodation, and anti-discrimination laws have varying eligibility requirements, causing widespread confusion among employers and employees regarding which laws apply. This lack of awareness leaves low-wage workers, particularly those with limited English proficiency, vulnerable to job loss when they are pregnant or caring for ill family members. Every day, we receive calls on our helpline from workers who are confused about their leave and accommodation rights or whose jobs have been threatened by employers who were unaware of their legal obligations, or simply disregarded them.
For example:
Teresa, a Spanish-speaking nursing home attendant, was recently fired from her job when she asked for time off to care for her elderly mother who had been hospitalized in Mexico. Her supervisor refused to accept her mother's doctor's note because it was in Spanish, and fired Teresa, even though she was eligible for job-protected leave under the FMLA and the state version of the Act.
Angela, an Asian American retail store employee, was fired from her job when she asked for additional time off after having a baby to recover from post-partum depression. Her employer sent her a letter saying she had exhausted all her family medical leave, so she had to return to work or be fired.
The EEOC Should Provide Clear Guidance Regarding the Pregnancy Discrimination Act, Title VII, and the Americans with Disabilities Act.
The rise in pregnancy discrimination complaints in recent years suggests that employers and employees would benefit from clear guidance from the EEOC regarding the protections afforded under the Pregnancy Discrimination Act, Title VII, and the Americans with Disabilities Act. We would welcome such guidance that includes the following principles.
1. Employers Violate the PDA When They Base Adverse Actions on Stereotypes of Pregnant Women's Capacity to Work.
The EEOC should make clear that an employer violates the Pregnancy Discrimination Act (PDA) when it terminates a woman because she is pregnant, might become pregnant, or recently had a child. It is well established that the PDA forbids subjecting a woman to adverse actions based on unfounded assumptions that she cannot safely perform her job.6 Yet the prevalence of forced leave and blatant pregnancy discrimination suggests that this point requires emphasis.
EEOC guidance should make clear that if a pregnant woman does not request a duty restriction, transfer, modified schedule, or leave on the advice of her health care provider, then her employer violates the PDA by imposing them on her.
Moreover, when employers expressly state that pregnancy is the reason for their adverse action, such evidence is more than sufficient to prove a violation of the PDA. No comparator evidence is required in such circumstances. See 2 EEOC Compliance Manual § 615, Enforcement Guidance: Unlawful Disparate Treatment of Workers with Caregiving Responsibilities at pp. 19-20 (2007), available at http://www.eeoc.gov/policy/docs/caregiving.pdf. Further, an employee may prove a PDA violation by presenting evidence that she was treated favorably before announcing her pregnancy and was subjected to negative treatment after her disclosure. As in retaliation claims, the temporal proximity between an employee's disclosure of her pregnancy and an adverse action may be strong evidence of discriminatory intent, without the need for comparative evidence.7
2. Reasonable Accommodations and a Good-Faith Interactive Process Are Required for Pregnancy- and Childbirth-Related Disabilities Under the ADA.
Even after the enactment of the Americans with Disabilities Act Amendments Act (ADAAA) in 2008, the EEOC has maintained its position that pregnancy itself is not a disability within the meaning of the ADA. 29 C.F.R. Pt. 1630, Appendix (Mar. 25, 2011). However, especially in light of the ADAAA's expansion of the concept of disability, a variety of pregnancy and childbirth-related impairments may qualify as disabilities. Id. The definition of disability is a physical or mental impairment that substantially limits one or more major life activities. 29 C.F.R. § 1630.2(g). Impairment is defined to include "any physiological disorder or condition . . . affecting one or more body systems. . . ." 29 C.F.R. § 1630.2(h) (emphasis added).
While pregnancy may not be a disability per se, most women will have a disability within the meaning of the ADA at some point during pregnancy or childbirth. In particular, during and following childbirth, women by definition have an impairment—a "physiological . . . condition affecting one or more body systems" that substantially limits one or more major life activities. 29 C.F.R. Pt. 1630, App.
Furthermore, employees with impairments that are caused or aggravated by pregnancy or childbirth—for example, gestational diabetes, hypertension, back pain, or post-partum depression—may have disabilities within the meaning of the ADA. As such, employers must provide these women with reasonable accommodations, and must engage in a good-faith interactive process.
Importantly, employers should conduct a fact-specific, individualized assessment of the employee's disability and need for accommodation. The full range of accommodations should be available to pregnant employees, including modified work duties, lifting aids, transfers, and leave. Even when FMLA leave is unavailable or has expired, employees may be entitled to leave as an accommodation for a pregnancy- or childbirth-related disability.
3. Even When Pregnancy-Related Conditions Do Not Meet the Definition of Disability under the ADA, Accommodations May Be Required Under the PDA.
The PDA mandates that employers treat those with pregnancy, childbirth, or related conditions the same as those who are similar in their ability or inability to work. 42 U.S.C. § 2000e(k). In light of the ADAAA, employers now are statutorily obligated to provide reasonable accommodations and engage in the interactive process with a broader range of employees, including those with temporary conditions. 29 C.F.R. Pt. 1630, App. Accordingly, the PDA now must be read to mandate equal treatment for those affected by pregnancy, childbirth, or related conditions and this broader range of comparators.8 For example, if, under the ADA, an employer would be legally required to accommodate a lifting restriction for a non-pregnant person with a temporarily disabling back condition, the employer must provide such an accommodation to a pregnant woman.
Further, as the EEOC has recognized, employer policies that deny leave or other accommodations may have an unlawful disparate impact on women. See 29 C.F.R. § 1604.10(c); Abraham v. Graphic Arts Int'l Union, 660 F.2d 811, 819 (D.C. Cir. 1981) (holding that excessively short or non-existent leave policies can create disparate impact liability).
4. A Hostile Work Environment Based on Pregnancy Constitutes Sex Discrimination.
Employers have a duty to maintain workplaces free of hostility based on pregnancy. Examples of unlawful harassment based on pregnancy may include:
EEOC guidance should make clear that a hostile work environment based on pregnancy constitutes unlawful sex discrimination, and that employers must take reasonable steps to prevent and correct harassing conduct.
In California, Broader Employment Protections Have Enabled Countless Workers to Stay Employed While Maintaining Healthy Pregnancies and Caring for Their Families.
California has long provided expansive employment protections for pregnant women, new parents, and caregivers. Since its enactment in 1978, California's Pregnancy Disability Leave law has required covered employers to provide women with up to four months of unpaid job-protected leave while they are disabled by pregnancy, childbirth or a related medical condition. The Supreme Court upheld this law against a claim that it was preempted by the Pregnancy Discrimination Act in Cal. Fed. Savings & Loan Ass'n v. Guerra, 479 U.S. 272 (1987).9
In addition to granting women the right to take leave to have a baby without risking their jobs, California's law also prohibits discrimination and harassment based on pregnancy, and requires employers to provide reasonable accommodations for pregnant women such as frequent bathroom breaks and modified work duties. Importantly, California's pregnancy leave, accommodation, and anti-discrimination provisions apply to all employers with at least five employees, and apply regardless of full- or part-time status or length of service.10
Moreover, after recovering from childbirth, women covered by the California Family Rights Act are entitled to take an additional 12 weeks of job-protected time off to bond with their baby.11 Finally, when women return to work, California law mandates lactation accommodations for women to express breast milk.12
California also is one of the few states with a State Disability Insurance program allowing women who are unable to work because of pregnancy- or childbirth-related disabilities to receive partial wage replacement during their leave. And it was the first state in the country to enact a comprehensive Paid Family Leave law, which provides 6 weeks of partial wage replacement to workers on leave to bond with a new child or to care for a seriously ill family member.
These laws provide critical protections for pregnant women, new parents, and those with caregiving responsibilities, enabling them to maintain their livelihoods while caring for themselves and their families.
Many of these protections have been in place for decades, and have been shown to be beneficial to both employers and employees. Indeed, by invoking these laws, workers are often able to preserve their jobs while avoiding the need for litigation at a vulnerable and stressful time in their lives. Meanwhile, employers benefit as well by retaining productive, loyal employees and reducing turnover costs. See, e.g., Eileen Appelbaum and Ruth Milkman, Leaves That Pay: Employer and Worker Experiences With Paid Family Leave in California (Jan. 2011) (documenting the success of California's Paid Family Leave program and its positive effects on families and business).
Still, gaps in the law remain, and those most in need of employment protections are least likely to know their rights, hindering many workers' ability to balance work and family demands. The vast majority of working women will become pregnant while employed, and caregiving responsibilities fall disproportionately on women.13 Low-wage women in particular are most likely to need flexible work arrangements due to caregiving obligations, but are least likely to have access to workplace flexibility.14 Indeed, no federal or state law provides the right to reasonable accommodations for caregivers. Those who do not meet the FMLA's restrictive eligibility requirements have no job protection when they need to care for a seriously ill relative. Further, the FMLA has an overly narrow definition of family, covering only parents, minor children, and spouses. Thus, workers cannot take time to care for other close family members, even if they are the only caregiver available.
Protections against pregnancy and caregiver discrimination—including entitlements to leave and accommodations—are essential for the health and well-being of women and their families. These protections are also critically important for workers' economic security. We commend the EEOC for drawing attention to unlawful pregnancy and caregiver discrimination, and for educating employers and employees about the protections afforded by the PDA, Title VII and the ADA.
Thank you for the opportunity to testify today.
1 The Pregnancy Discrimination Act: Where We Stand 30 Years Later (Nat'l Partnership for Women & Families 2008).
2 See Job Accommodation Network, "Accommodation Ideas for Pregnancy," available at https://askjan.org/soar/other/preg.html.
3 Naomi Gerstel & Amy Armenia, Giving and Taking Family Leaves: Right or Privilege?, 21 Yale J.L. & Feminism 102 (2009).
4 Id.; Ann O'Leary, How Family Leave Laws Left Out Low-Income Workers, 28 Berkeley J. Empl. & Lab. L. 1 (2007).
5 U.S. Bureau of Labor Statistics, "Employee Benefits in the United States – March 2011," available at http://www.bls.gov/ncs/ebs/sp/ebnr0017.txt.
6 See, e.g., UAW v. Johnson Controls, 499 U.S. 187 (1991) (striking down an employer's "fetal protection policy" that excluded women who were pregnant or capable of becoming pregnant from jobs involving exposure to lead).
7 See, e.g., Rohloff v. Metz Banking Co., LLC, 941 F. Supp. 2d 840, 852-856 (N.D. Iowa 2007) ("Different treatment of similarly-situated persons not in the plaintiff's protected class-here, non-pregnant persons-is one kind of evidence that may generate an inference of discrimination, but it is not the only kind of evidence that does so.").
8 Several courts held that the comparator under the PDA must be someone who was injured off the job. See, e.g., Spivey v. Beverly Enters., 196 F.3d 1309, 1313 (11th Cir. 1999) ("*A+n employer does not violate the PDA when it offers modified duty solely to employees who are injured on the job and not to employees who suffer from non-occupational injury. Of course, pregnant employees must be treated the same as every other employee with a non-occupational injury."). Other courts, however, have recognized that the PDA itself expressly provides that the appropriate comparison is to those "similar in their ability or inability to work," regardless of whether the disability was workplace-related. See, e.g., Ensley-Gaines v. Runyon, 100 F.3d 1220, 1226 (6th Cir. 1996).
9 See generally Patricia A. Shiu & Stephanie M. Wildman, Pregnancy Discrimination and Social Change: Evolving Consciousness About a Worker's Right to Job-Protected Paid Leave, 21 Yale J. L. & Feminism 119 (2009).
10 As of 2012, employers also must continue health insurance benefits for women on pregnancy disability leave. Cal. SB 299 (2011).
11 The CFRA also entitles eligible fathers and same-sex partners to take 12 weeks of bonding leave. Cal. Gov't Code § 12945.2.
12 See Cal. Labor Code § 1030. A federal law requiring reasonable break time for nursing mothers was enacted in 2010. See 29 U.S.C. § 207(a)(7)(r)(1).
13 Melissa Alpert & Alexandria Cawthorne, Labor Pains: Improving Employment and Income Security for Pregnant Women and New Mothers (Center for American Progress 2009).
14 See id.; Stephanie Bornstein, Poor, Pregnant and Fired: Caregiver Discrimination Against Low-Wage Workers (UC Hastings Center for WorkLife Law 2011), at pp. 5-7.


text:
Donald Trump's personal physician said he wrote a letter declaring the Republican nominee would be the healthiest president in history in just five minutes while a limo sent by the candidate waited outside his Manhattan office.
Dr. Harold Bornstein, who has been Trump's doctor for 35 years, told NBC News on Friday that he stands by his glowing assessment of the 70-year-old's physical state.
"His health is excellent, especially his mental health," he said in an exclusive interview at his Park Avenue office.
In his letter, Bornstein said there were no "significant medical problems" in Trump's history and that a recent examination "showed only positive results." The letter was written and released in December but has drawn fresh scrutiny in recent days as Trump's allies have questioned Hillary Clinton's health.


text:
It's no secret that Adobe make some of the best design tools in the world. It's also no secret that they can be very expensive, but if you're planning on buying most of the packages anyway then it may be worth opting for the CS6 Master Collection: you could save up to 60% compared to the cost of buying the individual packages.
What's included? The suite bundles Photoshop CS6 Extended, Illustrator CS6, InDesign CS6, Acrobat X Pro, Flash Professional CS6, Flash Builder 4.6 Premium Edition, Dreamweaver CS6, Fireworks CS6, Adobe Premiere Pro CS6, After Effects CS6, Adobe Audition CS6, SpeedGrade CS6, Prelude CS6, Encore CS6, Bridge CS6 and Media Encoder CS6.
And what's new? InDesign, Dreamweaver and other tools have a new focus on making sure your designs look just as good on any device: smartphone, tablet, PC and more. Photoshop has powerful content-aware technologies, new effects, even video editing support. But for really professional video editing just launch Adobe Premiere Pro, though: there's now amazing multicam editing, dynamic trimming tools and more powerful video stabilisation.
And although the list of entirely new features can be a little on the short side, for some apps at least, there's still a lengthy list of enhancements and improvements. Many interfaces have been optimised to improve usability and workflow, for instance (Illustrator has seen more than 40 tweaks all on its own). Enhanced memory management means Fireworks can support files up to 4x larger on 64-bit Windows systems. And just about every application here sees a significant performance boost through the Adobe Mercury Graphics Engine and Performance Systems, native 64-bit support and a host of code optimisations.
If there's a problem here, it's that bundling all these applications into a single suite makes for an enormous download, well over 6GB in size. The file you'll download here is Adobe's Download Manager, though, and that can pause and restart the download to suit your needs. Or, if you only want to check out a few of the main applications, then you can always download those separately: most have 30-day trial editions available.
The Adobe Creative Suite 6 Master Collection is a hugely comprehensive set of some of the best design tools around. And while it's not cheap, if you're planning to buy most of them anyway then it could help to save you some cash.