text:
Wednesday, March 12, 2014
Follow us:
Time Warner Cable video customers:Sign in with your TWC ID to access our video clips.
Sign in
After many years of plotting such a move, City Council Speaker Christine Quinn launched her mayoral campaign this morning in her old family neighborhood of Inwood in Manhattan, touting her record of "action" in the council and pledging to focus on making the city livable for the middle class.
Quinn made the announcement in front of the church where her parents were married, speaking alongside her wife, Kim Catullo, her father and father-in-law, and her sister and extended family. She described how her Irish immigrant grandparents came to the city a hundred years and several generations of her family were able to work and prosper there.
The Manhattan councilwoman also said her entire career has been focused on getting results, and mentioned her passing seven on-time city budgets in the council.
"I know I'm the best person, working with all of New York's 8.4 million people to make this happen. Because if you look at my record, it's not one of criticism and finger-pointing. It's one of action, results and delivery," Quinn said.
The speaker did not play up some history-making prospects of her candidacy, such as her potentially being the city's first openly gay mayor. Also, while women have run for mayor of the city before, none have won.
From Inwood, the council speaker then visited the South Bronx, the Forest Hills section of Queens, Bedford-Stuyvesant in Brooklyn and then West Brighton on Staten Island as part of a "walk and talk" tour.
Quinn had only one heckler in Forest Hills, Herbert Goldman, who criticized her pushing the 2008 referendum that abolished term limits. That allowed Quinn, Mayor Michael Bloomberg and many other city officials to run for a third term, before term limits were reinstated in 2010.
Goldman: We voted twice for term limits! How do you feel about that?
Quinn: I feel that in that vote, you took a position.
Goldman: In other words, we disagree. And you don't give a damn about our election votes.
Quinn: Absolutely not. That's not true.
Her campaign team started Sunday early by releasing an online video in which the speaker says her candidacy will focus on the city's affordability.
In her video and campaign announcement, Quinn avoided her close relationship with Mayor Michael Bloomberg, which has become a campaign issue within the Democratic primary.
However, a chief rival in the mayoral race, Public Advocate Bill de Blasio, said Quinn will not differ much than her ally.
"It seemed like more of the same today," de Blasio said Sunday. "I understand that she was asked if she felt good about what Bloomberg polices have done for the middle class and she was not willing to challenge the mayor. I think that's par for the course."
Later on Sunday afternoon, Quinn told NY1 she hoped the election would be about the current mayoral candidates and issues affecting New Yorkers, rather than be a referendum on Bloomberg's legacy.
"I don't think he's running, and elections are about the people who are running, I think," Quinn said. "I think this is going to be an election about the people who are running, and I believe New Yorkers want to have a mayor who can get the job done. How do you know if they can get the job done? Well, you can bank on it if you've gotten the job done."
She also said some of the important issues in the election are jobs creation, improving public schools and the CUNY system, helping small businesses, transportation and expanding early childhood education.
Quinn also used rhetorical to undercut potential criticism that she's too close to the business community. In her speech, Quinn gave extensive details on her working-class origins and her video touts her father's time as a shop steward for an electrical union.
The Democratic mayoral primary in September, but Quinn is currently at the head of the polls and was receiving endorsements even before her campaign was official.
A NY1/Marist College poll showed last month that 37 percent of registered Democrats would vote for Quinn, which is a 3-to-1 advantage over other Democrats in the race.
Besides de Blasio, former City Comptroller Bill Thompson and former City Councilman Sal Albanese are also running for the Democratic nomination and another likely rival is City Comptroller John Liu.


text:
News Releases by Email
News Release
Wednesday, December 07, 2011
Media contact: Joy Hill, 352-258-3426
Florida Fish and Wildlife Conservation Commission (FWC) invasive-plant managers plan to treat lakes Fairview and Sarah in Orange County during the week of Dec.12 for the invasive, exotic plant Nymphoides cristata.
Nymphoides cristata is an aquatic plant commonly known as crested floating heart. It is important to manage and treat it to help maintain the health of Florida's waters and to enable continued recreational boating and other aquatic activities.
The FWC will treat the Nymphoides cristata with Aquathol™ and Hydrothol™, which have no restrictions for fishing, swimming or irrigation. Aquathol and Hydrothol are approved by the U.S. Environmental Protection Agency for use in lakes.
The FWC's Invasive Plant Management Section will post notices at the lakes' public boat ramps on the days of treatments.
For questions about this treatment, contact Alicia Knecht, FWC invasive plant management regional biologist, at 321-246-0682.
FWC Facts:The wild pig, also called the wild hog, wild boar or feral pig, is not a Florida native and may have been introduced by Spanish explorer Hernando DeSoto as early as 1539.
Learn More at AskFWC

subset: commoncrawl


text:
Cream-Cheese Brownies
Lining the pan isn't busywork; it makes it easy to remove the brownies.
Get More
Subscribe to Martha Stewart LivingIngredients
- 10 tablespoons unsalted butter, cut into pieces, plus more for pan
- 1 cup plus 2 tablespoons all-purpose flour
- 1/4 cup unsweetened cocoa powder
- 1/2 teaspoon baking powder
- 1/2 teaspoon salt
- 8 ounces semisweet or bittersweet chocolate, chopped
- 4 ounces cream cheese, room-temperature
- 1 1/2 cups sugar
- 4 large eggs
Cook's Note
Step 1
Preheat oven to 350 degrees. Brush a 9-inch square baking pan with butter. Line bottom and two sides with a strip of parchment paper, leaving a 2-inch overhang on the two sides. Butter paper, and set pan aside. In a small bowl, whisk 1 cup flour, cocoa, baking powder, and salt; set aside.
Step 2
Place 8 tablespoons (1 stick) butter and chocolate in a large heat-proof bowl set over (not in) a saucepan of gently simmering water. Heat, stirring occasionally, until smooth, 2 to 3 minutes; remove bowl from pan. Add 1 1/4 cups sugar; mix to combine. Add 3 eggs, and mix to combine. Add flour and cocoa mixture; mix just until moistened (do not overmix).
Step 3
Prepare cream-cheese mixture: Whisk cream cheese with 2 tablespoons room-temperature butter. Whisk in 1/4 cup sugar, 1 egg, and 2 tablespoons all-purpose flour. Alternately spoon chocolate batter and cream-cheese mixture into pan; with the tip of a paring knife, swirl to marble.
Step 4
Bake until a toothpick inserted in center comes out with a few moist crumbs attached, 50 to 60 minutes. Cool in pan for 30 minutes. Using paper overhang, lift brownies out of pan; transfer to a rack to cool completely (still on paper). On a cutting board, using a dampened serrated knife, cut into 16 squares.
Everyday Food, May 2007Reviews (17)
Labellefleur11 Oct, 2013
Worst brownie recipe ever. They are more like cake than brownie, but not even a good cake since it was dense and crumbly. Will not make again.
kitkatmariekurek27 Mar, 2013
Just made these brownies today, and I'm impartial to how they turned out. They look gorgeous, and I was pleased as I pulled them out of the oven. However, they were browned a little too much (on the cream cheese swirls). The flavour was nice, but the texture was much more like a cake than brownie. I was hoping for more of a gooey, dense dessert, but all in all, I'm not complaining. A few adjustments would make this a killer recipe next time I give it a shot.
BittyA23 Jun, 2012
Who write this recipe? I had to rewrite it myself so it makes sense before I even start! Realized I'm not alone by reading the other reviews. We'll see how they turn out.....
lovetobake1234 Jun, 2012
The brownie layer was very delicious!! However the cream cheese layer was too thin and got slightly burnt around the edges. Should have used 8oz cream cheese...
MBenefield8 Sep, 2011
Really like this one ;-) Moist and rich.
oursette16 Sep, 2010
This recipe is amazing..before I start a new recipe, I always take time to read it well. Many of you have complain about it but don't see how hard it was to follow that recipe!! Those brownies are delicious, thanks Martha as always :)
mcaguayo7730 Apr, 2010
WOW!!! I made this today to celebrate "Children day" ...were totally a successs!!!!
thank you for this delicious variety of brownies...!!! really loved them!I would like to show you a pic, but I really don`t know where to load it.
greenecogal24 Feb, 2010
This recipe will be my new cheese cake alternative!! thank you martha :) These were also a hit last time I made them, since my daughter refuses to mix cheese with chocolate- http://www.fourgreensteps.com/community/recipes/desserts-a-goodies-/ebon...
Alison13 Oct, 2008
We've updated the recipe to reflect the correct ingredients and instructions.
Thanks for contacting us about the problem. -
kiltfire11 Oct, 2008
This receipe was a success for me, I made this last night and my guests LOVED them!
lalav1 Oct, 2008
I just mixed all the ingredients together and I had a bowl of cocoa and flour at the end and didnt know waht to do with it......I made it and all that for nothing proof read and fix your recipe!!!!
blue312skygirl17 Apr, 2008
This recipe is not written well, when you mix the cocoa with the flour mixture and then in number two they tell you to put in 1 cup of flour, this cocoa mixture is the mixture you need to put in, it is more than a cup but it works out fine. It was really moist and tasty but more like a cross between a bar cookie and a cake than a brownie. I
rads8 Apr, 2008
I cannot see the reciepes any more specially for the brownies...Please help
CourtneyFFox24 Mar, 2008
wow... so good and moist!!!
smi447716 Dec, 2007
End of Step 2 should read: "Add 1 cup of the FLOUR-COCOA MIXTURE, mix until mioistened." I followed the recipe and ended up with a bowl of flour, cocoa, baking powder and salt STILL set aside (from step 1) since Step 2 asked for "1 cup all-purpose flour". And I was left with a mixed chocolate batter without baking powder and salt.
smi447716 Dec, 2007
Proofreading needed indeed. End of Step 1 should read: "In a small bowl, whisk 1 CUP of flour, cocoa, baking powder and salt; set aside." Without specifying 1 cup, I added all of the flour (1 cup plus 2 tbsp) to my cocoa not knowing the 2 tbsp is intended for the cream cheese portion of the batter.
geewhiz28 Nov, 2007
This recipe needs proofreading. Step 3 describes how to put the two batters in the pan. Step 4 says to transfer the batter to the prepared pan. Huh? It doesn't seem feasible that two pans are involved.


text:
So my aunt was helping my 87-year-old devout Roman Catholic grandmother fill out her ballot the other day. She asked her to approve or reject R-74. Apparently my grandma said, "Oh, yes. They're all sleeping together anyway. They might as well get married."
Yay Grandma.
Reblogging mostly for the Dowager.
(via seriouslyamerica)
Love it!


text:
UPDATE: Christina Neuhaus, Swisscom's public spokesmen, has confirmed via Twitter that the iPhone 5 will in fact work on Swisscom's 4G/LTE network when it launches in December. (Swisscom 4G/LTE will be available in 12 cities accross Switzerland at launch. More info HERE)
Yes, the iPhone 5 IS Apple's best ever phone. Yes, it is a masterpiece of product design and engineering. And yes. You must buy it immediatly.
However… will you be able to to enjoy all of it's features in Switzerland?
I'm very happy to report that Swiss users will have access to nearly ALL iOS 6 features (yes, this means local Siri intergration and turn by turn directions). Notable exeptions however, include: 3D Buildings for maps, Siri Restaurant Reservations, Siri Movie Reviews, Siri Movie Showtimes and iTunes TV Shows (To check what features are available in your country, visit Apple.com's Feature list broken down by country)
LTE compatability seems to be a slightly more complicated subject. Switzerland is not listed on the list of countries offering LTE compatible networks at as of yet and Switzerland's main Telecom provider, Swisscom, seems tight lipped:
This has literally made my Sunday. Now if we could get this type of integration on the iPhone, I think my head would quite literally explode.
before the 17th century, almost all carrots cultivated were purple. The modern day orange carrot wasn't cultivated until Dutch growers in the late 16th century took mutant strains of the purple carrot, including yellow and white carrots and gradually developed them into the sweet, plump, orange variety we have today
Let's pause for a moment and imagine if today's farmers tried to change the color of a vegetable.
An inspiring and uncompromising inside look into Xavius (@thexavius), arguably the most influential Instagram artist in the world.
My name is Kurt. I live in Lausanne, Switzerland.
I'm passionate about technology, tea, magic tricks & photography.
For work, I co-founded dberry.ch in 2007, nappy.ch in 2012 and currently serve as an IT recruitment specialist for Randstad IT Professionals.
Welcome to my personal blog.


text:
Cash and Vouchers, Emergency Assessments, Food Consumption, Capacity Development, Climate Change, Monitoring, National Capacity, Emergencies, Floods, Qualitative Analysis, Focus on Women, Refugees and IDPs, Urban Food Insecurity, Food Security Analysis, Gender, Nutrition, School Meals
22 May 2013
22 May 2013
Ecuador WFP Ecuador's 2012 Annual Report documents a compilation of best practices in learning, innovation, and improved tools to reach the most vulnerable and improve their food and nutrition security. With the aim of being the partner of choice that builds the resilience of poor communities in the face of natural disasters, climate change, and food and nutrition insecurity, WFP in Ecuador has worked with the national and local governments to foster innovation, improve tools and take proven solutions to scale.
WFP Offices
Latest Videos/Galleries
- 24 December 2013 Ecuador: ECHO Delegation Visits Refugees in the Northern Border
- 7 November 2013 A Fun Nutrition Fair in Quito
- 16 October 2013 ECHO Visits Colombian Refugees in the Ecuadorian Northern Border


text:
Best selling products
Crafts For Kids
Unpainted Christmas Stocking Ornaments (1 dz)
Paint your own adorable Christmas ornaments. Made of nylon wrapped over a wire frame. Learn More -
Rhinestone Cross Ornament Craft Kit (1 dz)
Kids love to decorate these craft ornaments by adding glittering jewels to these foam crosses! Learn More -
Make Your Own Solar System Sticker (1 dz)
Bring your out of space party to life with these Make Your Own Solar System Sticker. Children will love making their own solar system and showing it off to friends! Learn More -
God Keeps His Promises - Rainbow Magnet Craft Kit (1 dz)
Let your children at bible school know the truth about God with these God Keeps His Promises Rainbow Magnet Craft Kits. These magnets are the perfect craft kit for vacation bible school or Sunday school. Learn More -
Paper Dinosaur Sticker Books (1 dz)
Children will love these educational Paper Dinosaur Sticker Books. These fun books are filled with various dinosaur facts & stickers that every kid is sure to love. Learn MoreRegular Price: $6.25
Now only: $4.68
Live In His Love Spiral Color Pads With Stickers (1 dz)
Make learning about Christ a bit more fun for little ones with these Live In His Love Spiral Color Pads With Stickers. These sticker books are filled with religious activities, coloring sheets, and stickers. Perfect for Easter or other religious holidays! Learn More -
Design Your Own Mini Beach Balls (1 dz)
Looking for a fun craft project to get kids ready to go to the beach? Everyone will love making one of these beach balls from this Design Your Own Mini Beach Balls Kit. Permanent markers or acrylic paint recommended. Learn More -
Design Your Own Shaped Fans (2 dz)
Children will love staying cool with these Design Your Own Super Shaped Fans. This fun craft project is perfect for preschoolers and allows kids to make a variety of fun shaped fans. This set includes eight of each design. Learn More -
Trust In The Lord Magnet Craft Kits (1 dz)
Children will love decorating their fridge with these Trust In The Lord Magnet Craft Kits. These kits are perfect for Sunday School or Vacation Bible School! Learn More -
Design Your Own Fabulous Foam Crosses (2 dz)
Children will love designing and decorating their own foam cross. This craft activity is ideal for VBG, Sunday school, or any other church activity. Learn More


text:
Download the Cycle for Survival Press Kit Including FAQ and Event Overview.
Download Press Kit
See Cycle for Survival Event Photos.
See Photos
"Cycling for cancer research in Times Square"
"Cycle for Survival Event Gears Up for 2nd Annual Event on Long Island"
All returning users and past participants please enter your login info.
We show that you are registered for multiple events.
Please select the event you would like to manage below.


text:
Follow Us:
Food Allergies Skin Allergies Eye Allergies Dust Allergy Latex Allergy Sinusitis Rhinitis (Hay Fever)
Asthma Symptoms Asthma Treatment Childhood Asthma Asthma Triggers Asthma Screening
The treatment of a Florida girl with peanut allergies at her school and the reaction of community members to precautions to keep her safe in school made headlines recently.
Precautions have included requiring students to wash hands and faces before entering classrooms and searching the school with a peanut-sniffing dog. These efforts have not been well-received by other parents.
The situation has resulted in a group of parents requesting that the child be home-schooled rather than have the school make further accommodations as are legally required by section 504 of the Rehabilitation Act of 1973 and the Americans with Disabilities Act.
As a researcher and pediatric allergist with experience investigating reactions in educational settings, it seems that stakeholders in this case need further information about the real risks that exist for a child with a food allergy attending school. This confusion may have resulted in policies that have created stress to all involved.
Here is what studies have shown:
While there is a recognized risk for a food allergy to occur at school, it's unlikely to happen without the child ingesting a peanut-containing product. It's also likely that the school and the food-allergic family are not always prepared to treat reactions. Kids with food allergy can safely attend school and this is the common goal that we must work to achieve.
Matthew Greenhawt, MD, MBA, FAAPAssistant ProfessorThe University of Michigan Medical School


text:
The Originators of Quick & Easy Cooking!
Down-Home Cookin'Bonus: Get our newsletter & special offers for free. We will not share or sell your email address. View our Privacy Policy |
Cake Baking Secrets: Tips & Tricks for Baking Flawless CakesWhether you're baking with cake mix or baking cakes from scratch, these helpful hints will save you both time and money in the kitchen. From sunken cakes to dry cakes, these tips and tricks will give you the knowledge you need to make perfect cakes every time. If you want to become a cake baking pro, the first thing you'll want to do is check to make sure your oven is heating at the correct temperature. If you've ever experienced common cake baking problems such as a sunken or collapsed cake, this could be because your oven isn't getting as hot as it says it is. An oven that's too hot could cause a dry cake. Invest in an oven thermometer -- your cakes (and cake tasters) will thank you! General Tips & Tricks:
Frosting Tips:
Common Problems & How to Avoid:
More Fun Facts & Substitutions:
Got a cake bakin' question we didn't answer? Leave it for us below in the comments section, and your question could be featured in our next Q&A with the Test Kitchen! And to help get you started, here are our own Test Kitchen's top 5 cake recipes:


text:
Stata 12 for Beginners
An ISSR Short Course by Jessica Looze
Date: September 27
Time: 2:00-4:00 pm
Location: ISSR Lab (Machmer W37E)
This is an introductory workshop that aims to familiarize participants with the Stata
12 interface and some basic Stata commands. It is targeted to university students and
researchers who have little or no prior experience with STATA but are interesting in
learning the software to use for data analysis, data management, and graphical data
visualization. Participants who already have Stata installed in their computers are
encouraged to bring them to use during the workshop, however a limited number of ISSR
laptops will be available for use during the session.
Course Objectives:
By the end of this session, participants will be able to:
•import data into STATA;
•combine datasets;
•manage missing values;
•label their data;
•create new variabless;
•compute basic statistics;
•understand the comparative components of each service
Click here to register for this workshop.
*please note that this workshop is now full. If you would like to be added to the WAITLIST you may fill out this form*


text:
3Rivers Archery Techs are Longbow and Recurve Experts that are here to help you find exactly what you need to keep you shooting on the range and in the woods. We are #1 in customer service and back our products with 100% Satisfaction Guarantee. Shop with confidence. Call or email us any time with your questions. We are happy to help!
Need more help?
Like this category?
(based on 1 review)
Ratings Distribution
5 Stars
4 Stars
3 Stars
2 Stars
1 Stars
Subscribe to Reviews
Reviewed by 1 customer
Displaying review 1
Back to top
Good Book
By Wauwaskona
from Michigan
About Me Recreational Archer
Best Uses
Comments about Deerskins into Buckskins: How to Tan with Natural Materials:
This book adds to my collection of Buckskinning information books
Comment on this review


text:
The Pro X Boat Shaped Meeting Table is a great addition to your office. This large table is perfect for meetings and conferences.
Give your office a substantial meeting place with the Pro X Boat Shaped Meeting Table! This office table has a rounded table top that will provide plenty of space for conferences and meetings. Made from sturdy commercial grade laminate wood with attractive wood grain veneers, this conference table has a great quality that will last for years. The veneers are hand selected and matched, then coated in an environmentally friendly UV lacquer. The table top is seven feet long and 29" tall.


text:
Often when you are creating a secondary tile in Windows 8, it will be based on images coming from the internet. However a requirement of secondary tile images are that they need to be stored locally. I initially had some problems getting this working right and the streams closed correctly for this to work, so here's the code for other to use and save the hazzle:
public async static Task CreateSecondaryTileFromWebImage( string tileId, Uri imageUri, string shortName, string displayName, string arguments, Rect selection) { //Download image to LocalFolder and use the tileId as the identifier string filename = string.Format("{0}.png", tileId); HttpClient httpClient = new HttpClient(); var response = await httpClient.GetAsync(imageUri); var imageFile = await ApplicationData.Current.LocalFolder.CreateFileAsync(filename, CreationCollisionOption.ReplaceExisting); using (var fs = await imageFile.OpenAsync(FileAccessMode.ReadWrite)) { using (var outStream = fs.GetOutputStreamAt(0)) { DataWriter writer = new DataWriter(outStream); writer.WriteBytes(await response.Content.ReadAsByteArrayAsync()); await writer.StoreAsync(); writer.DetachStream(); await outStream.FlushAsync(); } } //Create tile Uri image = new Uri(string.Format("ms-appdata:///local/{0}", filename)); SecondaryTile secondaryTile = new SecondaryTile(tileId, shortName, displayName, arguments, TileOptions.ShowNameOnLogo, image); secondaryTile.ForegroundText = ForegroundText.Light; await secondaryTile.RequestCreateForSelectionAsync(selection, Windows.UI.Popups.Placement.Above); }
Often this is enough, but there is still a small problem. What if the image is very light, and the text you display on top of it is white, thus drowning in the background image? You could set the tile text to black, but then what happens if the image is dark? And if it has a lot of texture in it, the text still gets very unreadable. Since you might not know up front what the image looks like, whether it's dark or bright, or textures, we will need a way to ensure the text will still look good on top of the image.
Unfortunately full WriteableBitmap support in WinRT isn't there to help us out modifying the image, but we do get low-level access to the pixel buffer of the image, so we could fairly simple darken or brighten the bottom a bit to ensure the image looks good as a backdrop for the text.
I wrote a little utility that loads the image, gradually darkens the bottom 40% of the image before saving it back. I've found that doing a slight graduated darkening on photos isn't too noticeably, while making the text in front of it much more readable. So with out further ado, here's my simple image pixelbuffer modifier:
private async static Task DarkenImageBottom(string filename, string outfilename) { var file = await ApplicationData.Current.LocalFolder.GetFileAsync(filename); BitmapDecoder decoder = null; byte[] sourcePixels = null; using (IRandomAccessStream fileStream = await file.OpenReadAsync()) { decoder = await BitmapDecoder.CreateAsync(fileStream); // Scale image to appropriate size BitmapTransform transform = new BitmapTransform(); PixelDataProvider pixelData = await decoder.GetPixelDataAsync( BitmapPixelFormat.Bgra8, BitmapAlphaMode.Straight, transform, ExifOrientationMode.IgnoreExifOrientation, // This sample ignores Exif orientation ColorManagementMode.DoNotColorManage ); // An array containing the decoded image data, which could be modified before being displayed sourcePixels = pixelData.DetachPixelData(); fileStream.Dispose(); } if (decoder != null && sourcePixels != null) { for (uint col = 0; col < decoder.PixelWidth; col++) { for (uint row = (uint)(decoder.PixelHeight * .6); row < decoder.PixelHeight; row++) { uint idx = (row * decoder.PixelWidth + col) * 4; if (decoder.BitmapPixelFormat == BitmapPixelFormat.Bgra8 || decoder.BitmapPixelFormat == BitmapPixelFormat.Rgba8) { var frac = 1 - Math.Sin(((row / (double)decoder.PixelHeight) - .6) * (1 / .4)); byte b = sourcePixels[idx]; byte g = sourcePixels[idx + 1]; byte r = sourcePixels[idx + 2]; sourcePixels[idx] = (byte)(b * frac); sourcePixels[idx + 1] = (byte)(g * frac); sourcePixels[idx + 2] = (byte)(r * frac); } } } var file2 = await ApplicationData.Current.LocalFolder.CreateFileAsync(outfilename, CreationCollisionOption.ReplaceExisting); var str = await file2.OpenAsync(Windows.Storage.FileAccessMode.ReadWrite); BitmapEncoder enc = await BitmapEncoder.CreateAsync(BitmapEncoder.PngEncoderId, str); enc.SetPixelData(BitmapPixelFormat.Bgra8, BitmapAlphaMode.Ignore, decoder.PixelWidth, decoder.PixelHeight, decoder.DpiX, decoder.DpiY, sourcePixels); await enc.FlushAsync(); str.Dispose(); } }
So we can call this utility prior to creating the secondary tile request. Compare the before(left) and after (right) here:
The image difference is barely noticeable, but the text is much more readable.
You can download the tile utility class and sample app here.
Windows Runtime
I recently had to lay out some text vertically stacked on top of each other in Windows 8, similar to how tabs in Visual Studio are laid out.
The obvious way to do that would be to first place the texts in a stack panel, and then rotate them like so:
<StackPanel> <TextBlock Text="Text 1"> <TextBlock.RenderTransform> <RotateTransform Angle="90" /> </TextBlock.RenderTransform> </TextBlock> <TextBlock Text="Text 2"> <TextBlock.RenderTransform> <RotateTransform Angle="90" /> </TextBlock.RenderTransform> </TextBlock> <TextBlock Text="Text 3"> <TextBlock.RenderTransform> <RotateTransform Angle="90" /> </TextBlock.RenderTransform> </TextBlock> </StackPanel>
This is what it looks like without the RotateTransform:
And after adding rotation:
Notice how the text is now outside the containing StackPanel, and overlapping each other? So what happened? The problem is that RenderTransform is applied AFTER the layout cycle occurs so StackPanel has no way of placing these elements, since it already did it's job prior to rotating the text. We'll get back to how to resolve this, but let's first cover the layout cycle, which consists of two steps: Measure and Arrange.
In the Measure step, each TextBlock is measured. This is basically the step where the parent control – in this case the StackPanel – tells each TextBlock "If you have [x,y] space, how much of that would you like to have?". It does this by calling TextBlock.Measure(Size) on each of them. The TextBlock then reports back the size it would like to have using the .DesiredSize property. You will notice that controls' DesiredSize property will always return (0,0) until the Measure step has run. Usually for TextBlocks it would report back the size of the text. If the text doesn't fit within the width that the StackPanel provided and TextWrapping was enabled on the TextBlock, the TextBlock might choose to break the text and report a taller height instead, so it can keep inside the width it was provided with.
The next step is the Arrange step. This occurs after all children has been measured, and the StackPanel here decides how much space it will provide to each control. While the TextBlocks provided a certain DesiredSize, they might not actually get that much space – that's all up to the parent control – for instance for a Grid's columns and rows with auto and * sizes, the measure step helped it determine how much space each row and column will be, and then applies that to each element during arrange. Arrange is done by calling .Arrange(Rect) on each element, providing them with a rectangle to place itself within.
So back to our problem: How can we use this knowledge to get the layout cycle to proper place my rotated textblocks?
Well first of all, when we rotate an element 90 degrees, the width of the text becomes the height, and vice-versa. So if we were to "swap" the width and height during Arrange, we should be able to prevent the overlapping and ensure that there's enough width, errr height for each TextBlock so they don't overlap. During the arrange step, we can ensure that the elements gets placed right and doesn't end up outside the containing control.
To do that, the first thing we'll do is create a new control. Add a new TemplatedControl to your project:
A new class inheriting from Control will be created, as well as a new \Themes\Generic.xaml template (if you already have a Generic.xaml file, the following will be added):
Let's get rid of the Border in this template, and add a simple ContentControl instead:
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:RotateSample"> <Style TargetType="local:RotateContentControl"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="local:RotateContentControl"> <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> </Border> <ContentControl x:Name="Content" Content="{TemplateBinding Content}" /> </ControlTemplate> </Setter.Value> </Setter> </Style> </ResourceDictionary>
Next let's add a Content dependency property to our class so that we can bind to the content. We'll also add a Content property to the class, to signify that anything that is used as content inside this control in XAML is meant to be assigned to the Content property. Our control now looks like this:
[Windows.UI.Xaml.Markup.ContentProperty(Name="Content")] public sealed class RotateContentControl : Control { public RotateContentControl() { this.DefaultStyleKey = typeof(RotateContentControl); } public object Content { get { return (object)GetValue(ContentProperty); } set { SetValue(ContentProperty, value); } } public static readonly DependencyProperty ContentProperty = DependencyProperty.Register("Content", typeof(object), typeof(RotateContentControl), null); }
Now if we were to run the app using this control, it'll basically be the same as using a ContentControl.
<local:RotateContentControl> <TextBlock Text="Text 1" FontSize="32" Margin="5" /> </local:RotateContentControl>
Of course this is not much fun, so let's first use the OnApplyTemplate to grab the content and apply the rotation to the content:
private ContentControl m_Content; private const double rotation = 90; protected override void OnApplyTemplate() { m_Content = GetTemplateChild("Content") as ContentControl; if (m_Content != null) { m_Content.RenderTransform = new RotateTransform() { Angle = rotation }; } base.OnApplyTemplate(); }
If you run the sample now, we'll basically be back to where we started with the texts offset and placed outside the parent container. You can see that the StackPanel is highlighted below with the size it thinks it needs to be to hold the TextBlocks, which doesn't match the actual size of the TextBlocks:
So let's first override the Measure step and swap width and heights:
protected override Windows.Foundation.Size MeasureOverride(Windows.Foundation.Size availableSize) { if (m_Content != null) { m_Content.Measure(new Size(availableSize.Height, availableSize.Width)); return new Size(m_Content.DesiredSize.Height, m_Content.DesiredSize.Width); } else return base.MeasureOverride(availableSize); }
You'll now see the following happen – notice how the height and width is now correct for the StackPanel if the TextBlocks were rendered in the right place, but we start seeing clipping on the TextBlocks:
This happens because the ArrangeStep still uses the unswapped width/height and causes clipping. Let's next override the Arrange and swap width and height here as well:
protected override Size ArrangeOverride(Size finalSize) { if (m_Content != null) { m_Content.Arrange(new Rect(new Point(0, 0), new Size(finalSize.Height, finalSize.Width))); return finalSize; } else return base.ArrangeOverride(finalSize); }
And the result we get is:
Now the text are not overlapping any longer nor are they clipped, but we still get them placed outside the parent StackPanel. This is because the rotation happens around the upper left corner and pushes the text out, as illustrated here:
Luckily the fix is easy because the Arrange step allows us to specify where to place the element as well. We basically have to move the TextBlock over to the left by the height of the text, so instead of specifying (0,0) for the rectangle corner, we use (width,0), so our Arrange looks like this:
protected override Size ArrangeOverride(Size finalSize) { if (m_Content != null) { m_Content.Arrange(new Rect(new Point(finalSize.Width, 0), new Size(finalSize.Height, finalSize.Width))); return finalSize; } else return base.ArrangeOverride(finalSize); }
And our controls now flows correctly within the StackPanel:
It also plays nice with other controls and respects alignments:
If you want to rotate the content –90 degrees, the offset in arrange changes slightly to:
m_Content.Arrange(new Rect(new Point(0, finalSize.Height), new Size(finalSize.Height, finalSize.Width)));
We could make this a property on our control, so you can easily change direction on the fly. We'll add a new Direction enumeration and a DependencyProperty that triggers Arrange when it changes:
public RotateDirection Direction { get { return (RotateDirection)GetValue(DirectionProperty); } set { SetValue(DirectionProperty, value); } } public static readonly DependencyProperty DirectionProperty = DependencyProperty.Register("Direction", typeof(RotateDirection), typeof(RotateContentControl), new PropertyMetadata(RotateDirection.Down, OnDirectionPropertyChanged)); public static void OnDirectionPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { (d as RotateContentControl).InvalidateArrange(); //Trigger reflow }
We'll also use remove the RenderTransform setting from OnApplyTemplate, and instead set it in ArrangeOverride, so that now looks like this:
protected override Size ArrangeOverride(Size finalSize) { if (m_Content != null) { m_Content.RenderTransform = new RotateTransform() { Angle = (int)this.Direction }; if (Direction == RotateDirection.Down) m_Content.Arrange(new Rect(new Point(finalSize.Width, 0), new Size(finalSize.Height, finalSize.Width))); else if (Direction == RotateDirection.Up) m_Content.Arrange(new Rect(new Point(0, finalSize.Height), new Size(finalSize.Height, finalSize.Width))); return finalSize; } else return base.ArrangeOverride(finalSize); }
So here's what that looks like in the designer:
That's it! Below is the entire source code including support for 0 and 180 degree rotations as well:
using Windows.Foundation; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Media; namespace RotateSample { [Windows.UI.Xaml.Markup.ContentProperty(Name="Content")] public sealed class RotateContentControl : Control { private ContentControl m_Content; public RotateContentControl() { this.DefaultStyleKey = typeof(RotateContentControl); } protected override void OnApplyTemplate() { m_Content = GetTemplateChild("Content") as ContentControl; base.OnApplyTemplate(); } protected override Windows.Foundation.Size MeasureOverride(Windows.Foundation.Size availableSize) { if (m_Content != null) { if (((int)Direction) % 180 == 90) { m_Content.Measure(new Windows.Foundation.Size(availableSize.Height, availableSize.Width)); return new Size(m_Content.DesiredSize.Height, m_Content.DesiredSize.Width); } else { m_Content.Measure(availableSize); return m_Content.DesiredSize; } } else return base.MeasureOverride(availableSize); } protected override Size ArrangeOverride(Size finalSize) { if (m_Content != null) { m_Content.RenderTransform = new RotateTransform() { Angle = (int)this.Direction }; if (Direction == RotateDirection.Up) m_Content.Arrange(new Rect(new Point(0, finalSize.Height), new Size(finalSize.Height, finalSize.Width))); else if (Direction == RotateDirection.Down) m_Content.Arrange(new Rect(new Point(finalSize.Width, 0), new Size(finalSize.Height, finalSize.Width))); else if (Direction == RotateDirection.UpsideDown) m_Content.Arrange(new Rect(new Point(finalSize.Width, finalSize.Height), finalSize)); else m_Content.Arrange(new Rect(new Point(), finalSize)); return finalSize; } else return base.ArrangeOverride(finalSize); } public object Content { get { return (object)GetValue(ContentProperty); } set { SetValue(ContentProperty, value); } } public static readonly DependencyProperty ContentProperty = DependencyProperty.Register("Content", typeof(object), typeof(RotateContentControl), null); public enum RotateDirection : int { Normal = 0, Down = 90, UpsideDown = 180, Up = 270 } public RotateDirection Direction { get { return (RotateDirection)GetValue(DirectionProperty); } set { SetValue(DirectionProperty, value); } } public static readonly DependencyProperty DirectionProperty = DependencyProperty.Register("Direction", typeof(RotateDirection), typeof(RotateContentControl), new PropertyMetadata(RotateDirection.Down, OnDirectionPropertyChanged)); public static void OnDirectionPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { if(((int)e.OldValue) % 180 == ((int)e.NewValue) % 180) (d as RotateContentControl).InvalidateArrange(); //flipping 180 degrees only changes flow not size else (d as RotateContentControl).InvalidateMeasure(); //flipping 90 or 270 degrees changes size too, so remeasure } } }
Note: While this article was written for Windows Store apps, these concepts apply directly to Silverlight, WPF and Windows Phone as well, albeit they already provide controls in the Toolkit (LayoutTransformer) to handle this.
XAML | Windows Runtime
I just got my first app published in the Windows Store, and I wanted to create a direct link from the game homepage to the entry in the Windows Store. For this you can use the ms-windows-store protocol on your links, as described on msdn. To set it up, the first thing you'll need to do is open up your project in Visual Studio, then open the Package.appxmanifest file. If your app has been associated with the Windows Store (this will happen the first time you create the publication package), the "Package family name" field should be populated under the "Packaging" tab:
Copy this package family name, and prefix it to "ms-windows-store:PDP?PFN="
Example: ms-windows-store:PDP?PFN=57398MortenNielsen.Bao_9qs9wzj9xadrg
This should open my game up directly in the Windows Store App if you are on Windows 8 (and while you're at it, please download it and throw it a good review – it's free and goes for a good cause :-).
You can also link directly to the review page by adding REVIEW to the prefix.
Example: ms-windows-store:REVIEW?PFN=57398MortenNielsen.Bao_9qs9wzj9xadrg (and please leave a good review while you're at it :-)
It's also possible to link to a website that shows the same overview. This is nice if the user doesn't have Windows 8 and you just want to tease them, or you prefer showing a webpage first in any case. However you won't be able to get this link until the app has been published. Sign in to the App Store Developer Portal, click the "Details" link for your app listing, and scroll down. You'll find a link under "Link to [APPNAME]",
Here's the link as an example what the Windows Store Webpage looks like: http://apps.microsoft.com/webpdp/en-US/app/bao/dbe2f3a7-2deb-40d5-9a69-2995f14d6706 (and if you didn't download the app yet, here's your second chance :-)
You can also integrate your application into the IE10 Metro browser. Here's what that looks like prior to installing the app:
And after install:
This would be a great experience if you offer both a website and a app version as well, allowing the user to quickly switch from one to the other. IE10 passes the url to your app so you can jump to a specific feature in your app, or you can add a third metatag with the arguments. You can read more about this feature here. Again you can try this experience at http://bao.win-rt.com (and this'll be your 3rd chance to download my app :-).
Here's the metatag you'll need to add to the header:
<meta name="msApplication-ID" content="App"/> <meta name="msApplication-PackageFamilyName" content="57398MortenNielsen.Bao_9qs9wzj9xadrg"/>.
The PackageFamilyName is the same, but the Application-ID you get by opening up the package.appmanifest in a text editor. Under the <Application> tag you'll find the ID:
<Applications> <Application Id="App" Executable="$target…
I recently got access to the Windows Store, and submitted my first app, "The game of Bao", a simple and fun board game I learned when we visited Malawi, Africa during our honeymoon (any money the game makes will be donated back to an organization working on improving the lives of the kids that taught us this game, so please be kind and play it a lot and give some great reviews :-).
I recorded the steps that I have had to go through so you can see what you need to have ready if you need to submit an app yourself.
*Note: Currently access to the Windows Store is limited to either companies and people who goes through an "App Excellence Lab". Once your app gets the "seal of approval" from a Microsoft Engineer, you'll get an invite code so you can create an account for the Windows Store.
When you sign into the windows store, the first thing you're greeted with is the dashboard, where you can submit an app.
Clicking "Submit an app" brings you to a list of the steps you have to go through. You work your way through them from top to bottom (you can always go back and change stuff as long as you haven't submitted yet):
First step is to give you application a name. This is a unique name, so if someone else already published an app with that name, you'll have to come up with a different name. Also note the mention that your app's manifest must have the exact same DisplayName set. You can also reserve your app name this way, and later finish the app submission process when your app is ready.
The next step is the selling details. There's quite a lot to fill out here, but still pretty straightforward:
The next page allows you to configure in-app purchase (you can add as many as you want, ranging from $1.49 up to $999.99):
The next step is the age rating. Make sure you read the "small" print. If your app has access to the internet, chances are you can't go with the lowest rating, no matter how PG your app is. Also note that for some countries a rating certificate is required to be able to publish there (I have no clue how to get these though):
Next step is declaring whether your app uses any form of cryptography (there's a lot of export restrictions on that technology). You either say yes or no. If you pick yes, you'll be asked a few more questions about this:
Next step is to upload your app package. In Visual Studio, select "Project –> Store –> Create App Packages…"
Pick for Windows Store.
You'll then be asked to sign in. It'll find the app name you reserved in the first step and then generate the .appxupload package that you'll need in the next step:
Next is the app description. You'll need 1-8 screenshots (1366x768), Promotional Images (846x468,558x756,414x468,414x80) keywords, app features, Description, web-link to Privacy Policy (if you have internet-enabled your app), description of all in-app purchace options to name a few.
Last step is to optionally include some notes to the testers:
When you're done, you should be back at the overview page with all check-marks:
Either review your data, or hit "Submit for certification". All you can do now is sit back and wait for the app to go through. There's an estimate listed of how long each step usually takes.
Sometimes you have some code that needs to run after a storyboard has completed. In my case I'm working on a little board game, and after each move (which I animate using a Storyboard), I need to figure out the next move, and either start a new play-animation or pass the turn to the other player.
Therefore I run in a loop until the turn is over. You can detect when a storyboard has finished when the "Completed" event triggers, but that makes for some recursive spaghetti code. It's much easier if I could just "await" the storyboard using a task. So I created the little extension method below that makes this possible. All you have to do to start and wait for the storyboard to finish is:
await myStoryboard.BeginAsync();
Below is the little extension method (which also serves as a general example on how you turn an event-based class into an awaitable Task using the TaskCompletionSource):
using System; using System.Threading.Tasks; using Windows.UI.Xaml.Media.Animation; namespace SharpGIS { public static class StoryboardExtensions { public static Task BeginAsync(this Storyboard storyboard) { System.Threading.Tasks.TaskCompletionSource<bool> tcs = new TaskCompletionSource<bool>(); if (storyboard == null) tcs.SetException(new ArgumentNullException()); else { EventHandler<object> onComplete = null; onComplete = (s, e) => { storyboard.Completed -= onComplete; tcs.SetResult(true); }; storyboard.Completed += onComplete; storyboard.Begin(); } return tcs.Task; } } }
Note: This code is written for WinRT. If you want to use this for Silverlight or WPF, just change 'Eventhandler<object>' to 'EventHandler'.
Windows Phone | WPF | Windows Runtime | Silverlight | XAML
Here's a little useful code snippet for opening up a file stream from either you local data store, or from the application folder in a Windows Store/WinRT/Metro/[insert name of the day] app:
using System; using System.IO; using System.Threading.Tasks; using Windows.Storage; using Windows.Storage.Streams; using System.Runtime.InteropServices.WindowsRuntime; //[...] public static async Task<Stream> ReadFile(string filename) { StorageFolder folder = null; if (filename.StartsWith("ms-appx:///")) { filename = filename.Substring(11); folder = Windows.ApplicationModel.Package.Current.InstalledLocation; } else { folder = Windows.Storage.ApplicationData.Current.LocalFolder; } while (filename.Contains("/")) { var foldername = filename.Substring(0, filename.IndexOf('/')); filename = filename.Substring(foldername.Length + 1); folder = await folder.GetFolderAsync(foldername).AsTask().ConfigureAwait(false); } var file = await folder.GetFileAsync(filename); IInputStream stream = await file.OpenReadAsync(); DataReader reader = new DataReader(stream); return await file.OpenStreamForReadAsync(); }
This allows you to get access to a stream from your application. Ie. if you have a file called "About.txt" in your project inside the folder "Assets" (remember to set build action to 'content'), you would access it like this:
using (var stream = await ReadFile("ms-appx:///Assets/About.txt")) { //TODO }
Note that the ms-appx:/// is the standard prefix for a uri to files within the application folder. If you want to get access to a file in your app data folder, just leave this off.
With Windows 8 Metro style apps, you can now also build XAML controls not only with C# and VB.NET but also with C++. If you are a .NET developer you will probably wonder why you would do that – and granted there might be several reasons you wouldn't. However there is a few nice things about C++ that .NET libraries doesn't give you: 1. You can use existing C++ libraries and link them directly in. This will allow you to re-use an enormous amount of code already out there. 2. DirectX is a first-class citizen in C++ 11, and officially the only way to use DirectX in XAML (although there are ways to access this from C#).
If you need high-performance rendering or 3D, DirectX is the way to go on the Windows Platform, and finally we can effortless mix DX and XAML (well at least compared to how it was in WPF). So this blogpost will show you how to build the base control you will need to make DirectX-in-XAML possible.
If you haven't made any custom controls before, I urge you to read my earlier post on why they are so awesome and how they work: Why Custom Controls are underrated
So let's open up Visual Studio 11, and go: New Project –> Visual C++ –> WinRT Component DLL
The project will create a new component class: WinRTComponent.cpp/.h. Delete these two files. We won't need them. Instead, right-click project –> Add new item, and pick "Templated Control".
This will add 3 new files, where the first two are:
#pragma once #include "pch.h" namespace MyControlsLibrary { public ref class MyDirectXControl sealed : public Windows::UI::Xaml::Controls::Control { public: MyDirectXControl(); }; }
#include "pch.h" #include "MyDirectXControl.h" using namespace MyControlsLibrary; using namespace Platform; using namespace Windows::Foundation; using namespace Windows::Foundation::Collections; using namespace Windows::UI::Xaml; using namespace Windows::UI::Xaml::Controls; using namespace Windows::UI::Xaml::Data; using namespace Windows::UI::Xaml::Documents; using namespace Windows::UI::Xaml::Input; using namespace Windows::UI::Xaml::Interop; using namespace Windows::UI::Xaml::Media; MyDirectXControl::MyDirectXControl() { DefaultStyleKey = "MyControlsLibrary.MyDirectXControl"; }
Also notice the comment at the top of the header file. This is important, and tells you to go open "pch.h" and add the following line at the bottom:
#include "MyDirectXControl.h"
I ignored this comment (ie. my brain refused to notice it) for hours until a friendly soul pointed it out – kinda annoying but just do it and move along.
The third file is the "Generic.xaml" template file. This is where the XAML that should be applied to the control is defined (this is exactly the same as in C#/VB.NET). We will open this and add a couple of minor changes highlighted in yellow, and remove the line crossed out:
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:MyControlsLibrary"> <Style TargetType="local:MyDirectXControl"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="local:MyDirectXControl"> <Border x:Name="DrawSurface" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> <TextBlock Text="My DirectX Control" HorizontalAlignment="Center" VerticalAlignment="Center" /> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style> </ResourceDictionary>
We name the border so we can get a reference to it from code behind (which we will get back to later), and also add a little text in the center just for fun.
Next let's try and use this control in a C# app. Right-click on your solution and select Add New Project. Pick a blank C# Metro style application.
Right-click the "references" in this new project and select "Add references" and select your other project under the "Solutions" tab:
Now open BlankPage.xaml and add the highlighted sections:
<Page x:Class="Application1.BlankPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:Application1" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:my="using:MyControlsLibrary" mc:Ignorable="d"> <Grid Background="{StaticResource ApplicationPageBackgroundBrush}"> <my:MyDirectXControl Background="Red" Width="400" Height="300" /> </Grid> </Page>
And you should see the control pop up in your designer (you won't see the red color yet – I left it so you can better see it in this screenshot):
Awesome! We now got a XAML control built in C++ consumed by C#! Now let's continue and add some DirectX magic to this control…
The first step for this is to include the DirectX libraries. If you are a .net developer, it's kinda like adding assembly references (but the experience will feel 1980s :-). Right-click your C++ project and select Properties. Navigate to Linker->Input, and add the following to "Additional Dependencies": d2d1.lib;d3d11.lib;
Next, lets add some methods, overrides and private variables to MyDirectXControl.h file that we'll be using for the our directx rendering:
#pragma once #include <d3d11_1.h> #include <dxgi1_2.h> #include <wrl.h> #include <windows.ui.xaml.media.dxinterop.h> #include "pch.h" namespace MyControlsLibrary { public ref class MyDirectXControl sealed : public Windows::UI::Xaml::Controls::Control { public: MyDirectXControl(); virtual void OnApplyTemplate() override; void Refresh(); private: Windows::UI::Xaml::Media::Imaging::SurfaceImageSource^ CreateImageSource(int width, int height); void OnMapSurfaceSizeChanged(Platform::Object^ sender, Windows::UI::Xaml::SizeChangedEventArgs^ e); void Draw(int width, int height); // template child that holds the UI Element Windows::UI::Xaml::Controls::Border^ m_MapSurfaceElement; // surface image source Windows::UI::Xaml::Media::Imaging::SurfaceImageSource^ m_imageSource; // Native interface of the surface image source Microsoft::WRL::ComPtr<ISurfaceImageSourceNative> m_imageSourceNative; // D3D device Microsoft::WRL::ComPtr<ID3D11Device> m_d3dDevice; Microsoft::WRL::ComPtr<ID3D11DeviceContext> m_d3dContext; Windows::Foundation::EventRegistrationToken m_sizeChangedToken; }; }
The first we'll implement is the "CreateImageSource" method which will generate a DirectX surface we can render to. We'll be using SurfaceImageSource which is one of the 3 types of DirectX surfaces we can use for this:
using namespace Windows::UI::Xaml::Media::Imaging; [...] SurfaceImageSource^ MyDirectXControl::CreateImageSource(int width, int height) { //Define the size of the shared surface by passing the height and width to //the SurfaceImageSource constructor. You can also indicate whether the surface //needs alpha (opacity) support. SurfaceImageSource^ surfaceImageSource = ref new SurfaceImageSource(width, height, true); if(width <= 0 || height <= 0) return surfaceImageSource; //Get a pointer to ISurfaceImageSourceNative. Cast the SurfaceImageSource object //as IInspectable (or IUnknown), and call QueryInterface on it to get the underlying //ISurfaceImageSourceNative implementation. You use the methods defined on this //implementation to set the device and run the draw operations. IInspectable* sisInspectable = (IInspectable*) reinterpret_cast<IInspectable*>(surfaceImageSource); sisInspectable->QueryInterface(__uuidof(ISurfaceImageSourceNative), (void **)&m_imageSourceNative); //Set the DXGI device by first calling D3D11CreateDevice and then passing the device and //context to ISurfaceImageSourceNative::SetDevice. // This flag adds support for surfaces with a different color channel ordering than the API default. // It is recommended usage, and is required for compatibility with Direct2D. UINT creationFlags = D3D11_CREATE_DEVICE_BGRA_SUPPORT; #if defined(_DEBUG) // If the project is in a debug build, enable debugging via SDK Layers with this flag. creationFlags |= D3D11_CREATE_DEVICE_DEBUG; #endif // This array defines the set of DirectX hardware feature levels this app will support. // Note the ordering should be preserved. D3D_FEATURE_LEVEL featureLevels[] = { D3D_FEATURE_LEVEL_11_1, D3D_FEATURE_LEVEL_11_0, D3D_FEATURE_LEVEL_10_1, D3D_FEATURE_LEVEL_10_0, D3D_FEATURE_LEVEL_9_3, D3D_FEATURE_LEVEL_9_2, D3D_FEATURE_LEVEL_9_1 }; HRESULT hr = D3D11CreateDevice( NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, creationFlags, featureLevels, ARRAYSIZE(featureLevels), D3D11_SDK_VERSION, &m_d3dDevice, NULL, &m_d3dContext ); if(FAILED(hr)) throw ref new COMException(hr); Microsoft::WRL::ComPtr<IDXGIDevice> dxgiDevice; // Obtain the underlying DXGI device of the Direct3D11.1 device. m_d3dDevice.As(&dxgiDevice); m_imageSourceNative->SetDevice(dxgiDevice.Get()); return surfaceImageSource; }
This is all boiler-plate code from MSDN. You can find more information there about what the above code really do.
The next portion is the code that will actually do the draw. I'll keep it simple here and just grab the background color of the control, and render that color to the surface.
using namespace Microsoft::WRL; [...] void MyDirectXControl::Draw(int width, int height) { if(width <= 0 || height <= 0) return; ComPtr<IDXGISurface> surface; RECT updateRect = {0}; updateRect.left = 0; updateRect.right = width; updateRect.top = 0; updateRect.bottom = height; POINT offset = {0}; //Provide a pointer to IDXGISurface object to ISurfaceImageSourceNative::BeginDraw, and //draw into that surface using DirectX. Only the area specified for update in the //updateRect parameter is drawn. // //This method returns the point (x,y) offset of the updated target rectangle in the offset //parameter. You use this offset to determine where to draw into inside the IDXGISurface. HRESULT beginDrawHR = m_imageSourceNative->BeginDraw(updateRect, &surface, &offset); if (beginDrawHR == DXGI_ERROR_DEVICE_REMOVED || beginDrawHR == DXGI_ERROR_DEVICE_RESET) { // device changed } else { // draw to IDXGISurface (the surface paramater) // get D3D texture from surface returned by BeginDraw ComPtr<ID3D11Texture2D> d3DTexture; surface.As(&d3DTexture); // create render target view ComPtr<ID3D11RenderTargetView> m_renderTargetView; m_d3dDevice->CreateRenderTargetView(d3DTexture.Get(), nullptr, &m_renderTargetView); auto brush = (SolidColorBrush^)this->Background; float a = brush->Color.A/255.0f; float r = brush->Color.R/255.0f; float g = brush->Color.G/255.0f; float b = brush->Color.B/255.0f; const float clearColor[4] = { r, g, b, a }; m_d3dContext->ClearRenderTargetView(m_renderTargetView.Get(),clearColor); } // TODO: Add more draw calls here //Call ISurfaceImageSourceNative::EndDraw to complete the bitmap. Pass this bitmap to an ImageBrush. m_imageSourceNative->EndDraw(); }
The next thing we'll implement is "OnApplyTemplate", which is called when the template in Generic.xaml is applied. At this point we can get a reference to the Border element, and apply the SurfaceImageSource as a brush to the background of the border.
void MyDirectXControl::OnApplyTemplate() { if(m_MapSurfaceElement != nullptr) { m_MapSurfaceElement->SizeChanged -= m_sizeChangedToken; m_MapSurfaceElement = nullptr; }
//Get template child for draw surface m_MapSurfaceElement = (Border^)GetTemplateChild("DrawSurface"); if(m_MapSurfaceElement != nullptr) { int width = (int)m_MapSurfaceElement->ActualWidth; int height = (int)m_MapSurfaceElement->ActualHeight; m_imageSource = CreateImageSource(width, height); ImageBrush^ brush = ref new ImageBrush(); brush->ImageSource = m_imageSource; m_MapSurfaceElement->Background = brush; m_sizeChangedToken = m_MapSurfaceElement->SizeChanged += ref new SizeChangedEventHandler(this, &MyDirectXControl::OnMapSurfaceSizeChanged); } }
Also notice that we attached a handler to when the border element changes its size. If this happen we need to recreate the surface and render it again:
//surface size changed handler void MyDirectXControl::OnMapSurfaceSizeChanged(Platform::Object^ sender, Windows::UI::Xaml::SizeChangedEventArgs^ e) { int width = (int)m_MapSurfaceElement->ActualWidth; int height = (int)m_MapSurfaceElement->ActualHeight; m_imageSource = CreateImageSource(width, height); Draw(width, height); ImageBrush^ brush = ref new ImageBrush(); brush->ImageSource = m_imageSource; m_MapSurfaceElement->Background = brush; }
Lastly, we have a Refresh() method that triggers a new draw. You can call this on your control to trigger a new rendering. Calls to should be triggered by a pulse and only happen when there's something new to draw (like for instance changing the background brush).
void MyDirectXControl::Refresh() { int width = (int)m_MapSurfaceElement->ActualWidth; int height = (int)m_MapSurfaceElement->ActualHeight; Draw(width, height); }
And that's it! We now have a complete XAML control that you can use in both your .NET and C++ XAML apps.
You can download the entire sample app here.
Also a big thanks goes out to Jeremiah Morrill for peer-reviewing this blog-post.
Tags: DirextX, WinRT, C++/CX, XAML
This morning I read an interesting article by Charlie Kindel: "Don't build API's". He talks about some of the issues with customers using your API in ways that you never thought they would be using it, and how you forever are stuck with supporting these 'almost unsupported' use-cases. I wouldn't go as far as saying you shouldn't be building an API at all. After all if your product is an SDK, this is what you would have to do .
I love working on API design and have been fortunate enough to be able to do this for several years now on a daily basis. I've gotten caught by similar issues that Kindel experienced as well. So over time, I have built myself a couple of mantras when I work on an API, and it generally is about how 'tight' or 'loose' you design your API. A very tight API has very few public methods and extensibility points, where a very loose API exposes everything and allows everything to be extended. My mantras are:
Unless there's a solid and strong use-case for it:
In other words: 'private' and 'sealed' are the keywords I think of first, next 'internal', next 'protected' (if class isn't sealed), and lastly (after a lot of thought) 'public'. 'virtual' comes even later. An example of this could be an event argument for an event that only your control will be raising. There's rarely a reason to create a public constructor1. The class won't be inherited from, so mark it sealed. Lastly the properties rarely will have any public setters either (the common use-case there is the .Handled property you can set to prevent bubbling). A great side-effect of tightening your API is that your API is smaller, leaner and meaner. The user of your API won't have to browse a gazillion members to find the method he needs to use. It'll be easier for him to understand your API, hit the things he's supposed to hit, and stay out of the parts that could shoot himself in the foot.
I'm not saying you shouldn't make anything public (it wouldn't be an API if you didn't). What I'm saying is that there needs to be a great and well-understood use-case for each and every one. As Kindel points out, you have to be VERY aware that any public method WILL be used in a way you didn't think of. And the moment you made it public, you will have to support it forever.
So what I'm saying is that if I can't think of a solid real-world use-case, making something publicly accessible wouldn't be my first choice. You can always come up with random use-cases, but are they real-world scenarios? Are they best practices? Would the be a better way to achieve a certain use-case? If you can't think of any, I would recommend keeping it tight, until that use-case shows up and you can get to understand it. Unless it saves a lot of customers a lot of time (which is essentially the purpose of an API), "Nice-to-have" features are unimportant. Focus on the "must-haves" first.
Any private and internal code you have is used in a finite set of use-cases2. You know the code that calls these methods, and they are in your full control. If a customer comes to you and wants access to these parts of the code, I generally first:
Let me say it again: You will have to support your public API forever! No more refactoring. No more major reworking to increase performance. No more major code cleanup. What you just did is now forever.
1 In some unit-testing scenarios being able to create types are useful (luckily .NET lets you do this through reflection, and Visual Studio's test suite helps you do it). Generally though you should be unit-testing your code, and your customer should just be testing their code. 2 Your internal API is also important - Keep things private unless 'internal' is really warranted, and try and make sure it can't be misused - again as software evolves, your internal use might change and you will use your software in ways you didn't originally think of - but at least here you're not tied by 'forever' supporting it.
The tiles on the new Windows 8 Start Menu "tilts" when you press them, tilting toward the direction you click/touch them. This effect is also well known from the Windows Phone tiles. Unfortunately there is no out-of-the-box way of accomplishing this in either of the platforms. However for Windows Phone, a TiltEffect class is in the Silverlight Toolkit, so I figured I could just port that. Turns out it wasn't that hard – all I pretty much had to do was change the manipulation events to use the new Pointer events instead, and will work with both mouse and touch.
To use it, first download the updated tilt effect class and add it to your project.
Next add a xmlns to register the namespace for use in XAML:
And lastly add the tilt effect to your control exactly like you would on the phone:
<Rectangle Width="200" Height="200" Fill="Blue" sg:TiltEffect.IsTiltEnabled="True" />
Here's what this look like on a couple of animated panels:
It's worth noting that the tilt effect is not EXACTLY the same as the Windows 8 start menu, but it's fairly close (and a bit cooler if you ask me )
Windows Runtime | XAML
I'm a big fan of building controls. I love writing them, designing them, trying to make it work in as many scenarios I can while keeping them simple, extensible and most importantly reusable. In fact for the past 6 years, it's all I've been doing full time (first ASP.NET and later XAML), and frequently in my spare time as well.
If you dabble in XAML, you have most likely already been building some controls, by going "File -> New -> User Control" in Visual Studio. You probably do this because you want to create a new page in your app, or you just want to encapsulate some of the UI in a separate section. Or perhaps it's because you realize that this little tidbit can be used over and over again in your application. Or maybe you have even considered it can be used again and again across many DIFFERENT applications. If you have tried those two last categories (or if you will one day), this blog post is for you! It will apply to any of the XAML techs there is: WPF, Silverlight, Windows Phone and the future Windows 8 Runtime.
Despite the title in this blog post, User Controls are awesome. They are quick to throw together and reuse over and over - and there's a lot of value in that. But what if I told you there's another control type that has even MORE power, better performance, and can be way more flexible and reusable than a user control, and where the clean code will make most developers fall in love?
The thing is you already know this because you've been using them all the time: Button, ListBox, ItemsControls, Grid, StackPanel etc. are all controls harnessing the same power you can! And you have probably seen XAML styles that completely changed the look and feel of a control, without touching any of its code. To give you an idea of how powerful this is, look at this Silverlight Sample below. On the left you will see a ListBox binding to a list of planets. You have probably already done something like this. On the right, you see a solar system. But in fact this is ALSO a ListBox. And there is NO extra code involved here. It's done entirely by restyling the template. Notice how selection and up/down keys work just like it does with the "normal" ListBox. So I got to reuse all the code that has this, and all I had to do was restyle the ListBox a bit. Something I could have done entirely in Blend without ever touching code.
Let me repeat that: I didn't add any code to the ListBox do this. In fact the code behind for this page is completely empty. If you don't believe me, here's the source code. You can also see more about this technique in this presentation from Mix'08, or read David Ansons blogpost on it.
So at this point hopefully I have won you over to learning more about Custom Controls (if not I'm amazed you have read this far :-).
To start, let's first look at the anatomy of a typical UserControl and try and fully understand how that works first. Below here we have the XAML portion of our control that defines the layout. We'll keep it simple and have a Grid with a Button inside it:
<UserControl x:Class="MyApp.SilverlightControl1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Grid x:Name="LayoutRoot" Background="White"> <Button Content="Click Me" Click="Button_Click" Opacity=".5" /> </Grid> </UserControl>
And we have the code-behind that loads up the control, handles user interaction etc.
using System.Windows; using System.Windows.Controls; using System.Windows.Media; namespace SolarSystemRetemplate { public partial class SilverlightControl1 : UserControl { public SilverlightControl1() { InitializeComponent(); } private void Button_Click(object sender, RoutedEventArgs e) { LayoutRoot.Background = new SolidColorBrush(Colors.Red); } } }
The things worth noting here are two things: "LayoutRoot" is defined in the XAML using x:Name, and we automatically get a variable by that name in code behind. Also the event handler hooked to the Button's Click event is magically linked to the code-behind. All this is really handled by the compiler and the "InitializeComponent" call - a method that interestingly doesn't exist here. The reason this works is really because this is a partial class as indicated, and Visual Studio creates a little 'secret' file under the covers for you. You can get to if if you right-click the method and select "Go To Definition". Here's what the contents of that file looks like:
namespace MyApp { public partial class SilverlightControl1 : System.Windows.Controls.UserControl { internal System.Windows.Controls.Grid LayoutRoot; private bool _contentLoaded; /// <summary> /// InitializeComponent /// </summary> [System.Diagnostics.DebuggerNonUserCodeAttribute()] public void InitializeComponent() { if (_contentLoaded) return; _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/MyApp;component/SilverlightControl1.xaml", System.UriKind.Relative)); this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot"))); } } }
You'll notice that the LayoutRoot is defined here as internal, and it's assigned using the "FindName" method.
This is one of the nice things about UserControls: A lot of the work is automatically done for you, but with Custom Controls you will have to do this yourself! (but this isn't so bad considering the power you get!). And here's the kicker: A UserControl is just another custom control!
A custom control doesn't have a XAML and a code-behind component in the same way UserControl does. Instead it's ALL code along with a default XAML template. You can consider the template the equivalent of the XAML in the User Control, but the important part to remember here is that this template can be changed by ANYONE, which is what I did to the ListBox in the solar system sample. Another thing to note is that since the template doesn't have a corresponding code-behind where Visual Studio generates a partial class for you, any event handlers cannot be defined in the template. So how do we go about recreating the user control above as a custom control?
For Silverlight this is easy. Right-click your project and select "File -> Add New -> Silverlight Templated Control". WPF and Windows Phone doesn't come with this template so you'll have to do it manually there, by creating a class and a generic template file. After you do this, you'll notice two new files: First a simple C# class, and second a new file in \Themes\Generic.xaml. The second file is where you place all templates for all your controls in that assembly. It HAS to have this name and live in this folder for the custom control to pick up the template.
Below is what this template looks like. I've added the grid and the button inside the suggested border that was created for me.
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:MyApp"> <Style TargetType="local:TemplatedControl1"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="local:TemplatedControl1"> <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> <Grid x:Name="LayoutRoot"> <Button x:Name="ClickButton" Content="Click me!" Opacity=".5" /> </Grid> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style> </ResourceDictionary>
First notice the TemplateBinding statements on the border. This is an important feature of controls. You can bind straight to a dependency property defined in your control code. Since a custom control inherits from "Control", you automatically get Background, BorderBrush, BorderThickness and many other general properties from the inheritance. The great thing is that you can just write <my:TemplatedControl Border="Red" /> and the border will automatically be bound into this template (and anywhere else where you have a TemplateBinding to that property). This beats UserControl, where to accomplish this in Silverlight you will have resolve to a hack by setting the DataContext of the control to itself, breaking the DataContext flow.
Second, notice that I didn't add a click-handler to Button. If I did, this template would fail to load. We'll hook the click handler up later.
Next let's look at the code for the control:
using System.Windows; using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Media; namespace MyApp { [TemplatePart(Name="LayoutRoot", Type=typeof(Control))] [TemplatePart(Name = "ClickButton", Type = typeof(ButtonBase))] public class TemplatedControl1 : Control { Control layoutRoot; ButtonBase button; public TemplatedControl1() { this.DefaultStyleKey = typeof(TemplatedControl1); } public override void OnApplyTemplate() { if (button != null) //unhook from previous template part { button.Click -= new RoutedEventHandler(button_Click); } button = GetTemplateChild("ClickButton") as ButtonBase; if (button != null) { button.Click += new RoutedEventHandler(button_Click); } layoutRoot = GetTemplateChild("LayoutRoot") as Panel; base.OnApplyTemplate(); } private void button_Click(object sender, RoutedEventArgs e) { layoutRoot.Background = new SolidColorBrush(Colors.Red); } } }
First I declare the "TemplatePart" attributes on the control. They tell what parts (ie controls) are expected to be in my template. In this case LayoutRoot of type Panel (Grid is a Control), and ClickButton of type ButtonBase. These are not strictly required, but they help Expression Blend understand the template requirements when you later customize the control. I always declare the lowest needed type in the control hierarchy to make the template more flexible. For instance I use ButtonBase and not Button, because I only rely on the Click event which is declared on the ButtonBase base class. That way I don't lock a user of the control into using "Button" but they can place ANY control that inherits from ButtonBase here. Same thing applies for the LayoutRoot, where I just need the Background property.
Next the control inherits from "Control". Custom controls must inherit from this.
In the constructor I define the "DefaultStyleKey". This tells the framework that I have a default template defined in Themes\Generic.xaml. If I didn't the user would always have to explicitly defined a control template for the control.
Lastly, the most important part is "OnApplyTemplate". This method is called when the control has loaded the template. This is our earliest opportunity to grab references to controls in the template, ie. the TemplateParts. In this case I grab a reference to the ButtonBase defined in the template. If it's found, I'll add a click handler to it. Also if a new template gets applied, I must remember to unhook from the previous instance (this is a rare scenario though, and you could probably get away with skipping that bit). It's also important to note that Template Parts are always optional! So always do the null check anywhere you rely on a reference to a template part.
And that's really it! I kept the sample simple, so it is easier to go through the individual parts of a control, therefore the differences between a custom control and a user control doesn't really stand out. If this was all you needed to do, a custom control is probably overkill. But think of scenarios where you have a lot of code-behind that you want to reuse, but you don't want to lock the design in. The major next parts you will want to add to this now is more Dependency Properties you can bind into the template, as well as VisualStates - ie. storyboards that triggers on certain events. The great thing about Visual States is that the code-behind doesn't define the storyboard or what it does - only when it starts. This gives the user even more flexibility to customize the behavior.
Let's add some mouse over states to our control, and have the control animate when that happens. In the code-behind where we defined the TemplateParts let's add two TemplateVisualState attributes:
[TemplateVisualState(GroupName = "HoverStates", Name = "MouseOver")] [TemplateVisualState(GroupName = "HoverStates", Name = "Normal")]
Again these are optional, but great for Blend integration.
Next add the code that triggers the visual state to the control:
bool isMouseOver; protected override void OnMouseEnter(System.Windows.Input.MouseEventArgs e) { isMouseOver = true; ChangeVisualState(true); base.OnMouseEnter(e); } protected override void OnMouseLeave(System.Windows.Input.MouseEventArgs e) { isMouseOver = false; ChangeVisualState(true); base.OnMouseLeave(e); } private void ChangeVisualState(bool useTransitions) { if (isMouseOver) { GoToState(useTransitions, "MouseOver"); } else { GoToState(useTransitions, "Normal"); } } private bool GoToState(bool useTransitions, string stateName) { return VisualStateManager.GoToState(this, stateName, useTransitions); }
This is really all the code we need. It's pretty simple. If the mouse is over, trigger the MouseOver state, else trigger the Normal state. Note how we don't really define what "MouseOver" looks like. That's the job of the template. Let's define that (you might already be very familiar with this when overriding templates - it's exactly the same thing, except we get to define the default state):
<ControlTemplate TargetType="local:TemplatedControl1"> <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="HoverStates"> <VisualState x:Name="MouseOver"> <Storyboard> <ColorAnimation Storyboard.TargetName="BackgroundElement" Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Color)" To="Yellow" Duration="0:0:.5" /> </Storyboard> </VisualState> <VisualState x:Name="Normal"> <Storyboard> <ColorAnimation Storyboard.TargetName="BackgroundElement" Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Color)" To="Transparent" Duration="0:0:.5" /> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <Grid x:Name="LayoutRoot"> <Rectangle x:Name="BackgroundElement" Fill="Transparent" /> <Button x:Name="ClickButton" Content="Click me!" Opacity=".5" /> </Grid> </Border> </ControlTemplate>
So the changes here is adding a rectangle in the background that we animate into yellow when the mouse hovers over.
You now have a control that sets a background on some Panel when some ButtonBase is clicked, as well as running an animation on MouseEnter/Leave. This could serve the purpose for quite a lot of controls, without you having to rewrite the code!
Here's a few resources you will want to read if you want to learn more about this:
A couple of other controls I've built over the time and described on this blog:
If you want to go even more hardcore, wrap your head around the ArrangeOverride and MeasureOverride methods. This is where you can get some really amazing control over how the contents are laid out, but this is outside the scope of this article, but I urge you to read into it. Here's one article to get your started on that: http://www.switchonthecode.com/tutorials/wpf-tutorial-creating-a-custom-panel-control
XAML | WPF | Windows Runtime | Silverlight | Windows Phone
Morten Nielsen<--That's me E-mail me
Twitter @dotMorten
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.© Copyright 2005-2011


text:
April 6, 2011: 20 Under-20 - Episode 2
The U.S. Under-20 MNT readies for a quarterfinal match against host Guatemala that will send the winner to the 2011 FIFA U-20 World Cup. The important third game of the CONCACAF U-20 Championship has presented some unique challenges for the coaching staff. Take a look at how they've faced those challenges ahead of the match.
Related Tags: U-20 Men, 2011 CONCACAF Under-20 Championship, CONCACAF Under-20 Championship, Guatemala


text:
Submitted by Xaviar Xerexes on September 9, 2008 - 08:57
Dirk Deppey catches all the Platinum news this morning. Deppey describes a now-deleted post on the Investors Hub website (here's the Platinum discussion forum there if you're interested) by Platinum COO Brian Altounian that was a pretty inflamatory comment on Platinum's "relationship" with creator D.J. Coffman. Coffman responded here and later here.
Deppey also links to a Publisher's Weekly story that focuses in on how book publishers are still happy with the new WOWIO site whereas comic publisher are not. I think that actually speaks volumes to where the two types of publishers are in terms of adapting to the web and incorporating new media into their publishing strategies.
Re: Platinum
by Bengo - 09/12/2008 - 13:24
It's typical for companies amidst a merger to go through non-essential cash flow freezes. The failure to pay, while another black eye for Platinum's reputation, is actually something that may be beyond their control as contract lawyers and auditors go through the books and fold everything into a new enterprise. As a publicly held corporation, Platinum may be prohibited from shelling out money to someone else's creditors until certain legal and fiduciary benchmarks have been met. This seems to be confirmed by the recent Platinum statement that all will be paid with interest.
While I sympathize with every artist who has not been paid, the journalistic standards on this story have been inappropriately sensationalistic and poorly informed. Just because Platinum's public relations have been clumsy doesn't mean we get to lower our journalistic ethics and print undocumented stories where the subject was not invited to comment. That's just gossip, and I'm disappointed to see you repeat it.


text:
Mirror Mirror: DLP
Running Time:
106 minutes
An evil queen steals control of a kingdom and an exiled princess enlists the help of seven resourceful rebels to win back her birthright. Stars:Lily Collins, Julia Roberts and Armie Hammer
Date of Show:
Thursday, March 13, 2014
Showtimes for Thursday, March 13, 2014
No showings of this movie for this date.
2012 Wehrenberg Theatres


text:
Pantone View Home + Interiors 2014 Kit
Divided into key trend palettes that display visual inspiration, suggested color harmonies and 1x4 swatches of each of the 75 forecasted colors. CMYK equivalents are supplied for each of the forecasted colors. This kit also includes the PANTONE Fashion + Home color guide and PANTONE COLOR MANAGER software for digital design.
Item # A26813
Mfg # 2012-996
- Compare to: $ 550.00
- Buy at: $ 511.50
- You Save: 7%
Item Ships Free Domestic Ground
Please Note: All prices shown on this web site are for orders placed online only.
Pricing for phone, fax, email and in-store purchases may vary.


text:
Peace envoy says Syria is 'being destroyed'
UNITED NATIONS (AP) — International envoy to Syria told the Security Council on Tuesday that "Syria is being destroyed bit by bit" and his mediation effort cannot go forward unless the council unites to push the Syrian government and opposition forces toward some compromise.
The Security Council has been divided over Syria for months, with the United States, Britain, France and other Western powers backing the armed opposition and pushing for resolutions that raised the threat of sanctions. Three times, Russia and China have cast vetoes to block those resolutions.
"I'm embarrassed to be repeating the same thing: Syria is being destroyed," Lakhdar Brahimi, the joint U.N.-Arab League envoy to Syria, said after closed-door consultations with the Security Council.
Brahimi blamed both Syrian President Bashar Assad's government and the Western-backed opposition forces.
"Objectively, they are cooperating to destroy Syria. Syria is being destroyed bit by bit. And in destroying Syria, the region is being pushed into a situation that is extremely bad, and extremely important for the entire world," Brahimi said.
He said that is why the Security Council has a duty to overcome its divisions.
Brahimi suggested that the Security Council revisit the Geneva Communique of June 2012, a broad but ambiguous proposal endorsed by the Western powers and Russia to provide a basis for negotiations.
Assad's role in any transition government was a red line during the negotiations of the Geneva Communique, and was left vague. The United States and Russia continue to disagree on Assad's role, though both signed off on the communique.
Brahimi says the Security Council should now look toward the provisions of the Geneva Communique as a solution.
"A very critical element is the creation of this governing body, which is really a transition government, with full executive powers," Brahimi said.


text:
Search Result
Search Tags: Secret Service
Secret Service apologizes for contributing to midday traffic jam
The Secret Service has pledged to work with the D.C. mayor's office to improve planning and has apologized for contributing to the gridlock that spread through downtown Tuesday.
Tags: Vincent Gray, traffic jam
ListenGray to Secret Service: Don't close 14th Street
D.C. Mayor Vincent Gray complains to the Secret Service for closing portions of 14th Street Tuesday, causing gridlock.
Tags: AIPAC, Vincent Gray,
Kin: Police docs don't justify Conn. woman's death
Tags: Miriam Carey, capitol shooting, chase, fatal shooting, Capitol Police, U.S. Capitol, Stamford, Conn.
Driver charged in Georgetown waterfront stabbing
The Secret Service has charged a driver with stabbing two people near the Georgetown waterfront.
Tags: Max Milien, Georgetown waterfront, stabbing
Congresswoman: Secret Service "ruined" Wednesday's celebration
The U.S. Secret Service came in for some sharp criticism from Rep. Eleanor Holmes Norton over how they handled security at Wednesday's March on Washington anniversary celebration.
Tags: Eleanor Holmes Norton, march on washington, Hank Silverberg
Va. dog trainer to appear on reality series 'Alpha Dogs'
Dog trainer Nick White, owner of Off-Leash K9 Training in Woodbridge, Va. was invited to train with Nat Geo Wild's new reality show "Alpha Dogs" next month.
Tags: Dogs, training centers, marines, reality TV, National Geographic, military, Woodbridge, Va., Katy Nelson
Media wants hearing on Levy closed proceedings
Tags: Ingmar Guandique, Chandra Levy, Gary Condit,
Secret Service dog falls to its death while on Biden detail
A Secret Service dog fell to its death Saturday night while doing a security sweep of a New Orleans parking deck near a hotel where Vice President Joe Biden was speaking, according to multiple news reports.
The Toughest Mile: Behind the security curtain for Inauguration Day
On Inauguration Day, security along the 1.2-mile stretch of Pennsylvania Avenue, between the White House and the U.S. Capitol, could present the greatest challenge to date for the Secret Service and its partners, say security experts.
Tags: inauguration day, j.j. green
ListenThe Toughest Mile: Hands in the crowd
In the run-up to President Barack Obama's second Inauguration Day, the president's security team worries most about the hands of people in the crowd and those typing hostile commands on computer keyboards and devices far from the National Mall.
Tags: Inauguration Parade, inauguration day, inauguration, FBI Joint Terrorism Task Force, JJ Green, Ralph Basham


text:
Dedicated to sharing great historical photos of Australia
RSS feed Mobile Archive Search Suggestions? Comments?
Esquire Theme by Matthew BuchananSocial icons by Tim van Damme
At Sea. A greasy pole pillow fight contest in progress aboard troopship Aeneas (A60) during a November 1919 to January 1920 voyage carrying AIF troops home from England. (Extracted from troopship Aeneas Diary)
1 year ago Short URL 1 note
history/australia/pillow fight/pillow/soldier/troops/troopship/
Australian swimmer Murray Rose is the target of a pillow fight from team mates Ron Faulds, Barry Holmes and Frank Murphy, Melbourne, 1956
taken by Howard, Bruce, 1936-
1 year ago Short URL
australia/history/pillow/pillow fight/swimmer/murray rose/athlete/olympics/melbourne/


text:
AQHA chestnut yearling filly
Clear Lake, MN
i have a yearling chestnut filly born july 6,2011 very easy going girl. pritty,friendly, leads,loads,ties,stands for farrier,vet. reg name playin poco olena, i just dont think i will be able to start her next yr, i rent land and need to downsize, she is an awsome filly, kills me to put this up. she isnt a fast mover right now, she is gental, easy to catch, mainly comes up to you if you are working in the pasture, we drag the field with the 4wheeler and when we sit to rest she is right up on the 4wheeler and smells it, starting it up she dosent move we have to walk her away to go again. she is a sweet heart. http://www.allbreedpedigree.com/playin+poco+olena I have an awesome project for anyone, she is a big sweet heart, comes to you in the pasture, follows you around the pasture, no bit/kick/rear/buck. she is easy to catch, feet are done, worming done 5/6, fluvac 5 shot done 5/6, she stands for tacking up. lunges, leads/loads/trims/ going to give her a bath and upload pictures. my 4yr old daughter can lead her around. she stands 13.2 right now, was told she is foundation bred so wount be to big for anyone to work with, I just don't have the time she needs, she is cowbred, go any direction, she is very mellow. when grained she dosent try to run you over to eat, low pecking order, dosent pick on anyone, she would rather run then fight. come meet this baby doll. kills me to put her up. pictures are not the best but they give you an idea of what she is like, will be working with her more today 5/14 in the round pen, in the pictures I used my daughters hackney paint's headstall and bit because she has a small head, only tacked her and lunged her once with no problem with any of it. this yearling is super sweet, loves attention, easy to catch great for farrier, great for fly spray she's just a all around good filly with a great pedigree, freckles playboy,not quite an acre, olenas command, doc o'leana all performance horses her mother is 92% foundation and sire is 89% foundation, she should mature to 14 3 or 15 hands she short and stocky now that comes from all the foundation bloodlines http://www.flickr.com/photos/89575476@N06/
Ask a question or leave a comment...
Important Safety Tips
- Meet the seller and pet in person
- Don't wire money or take advance payments.
- Only pay for shipping if you know the seller.
To learn more, visit the Safety Center or click here to report this listing.
More About this Listing: AQHA chestnut yearling filly
AQHA chestnut yearling filly is a Female Quarter Horse Young for sale in Saint Cloud. Find other listings like AQHA chestnut yearling filly by searching Oodle for Female Quarter Horse Horses.
AQHA chestnut yearling filly is a Female Quarter Horse Young for sale in Saint Cloud. Find other listings like AQHA chestnut yearling filly by searching Oodle for Female Quarter Horse Horses.


text:
Written anonymously. (English) | |
Written anonymously. (English) | |
A group of 7 organizations and networks will convene a second international Feminist Dialogue in Porto Alegre, Brazil, from 23-24 January
The Dialogue will convene prior to the World Social Forum as an autonomous event. As such, it is not primarily about strategies or orientation regarding the WSF (which we hope could emerge as a public gathering, convened by a broad array of women's organizations on January 25. Let us know if you are interested in helping to work on such a gathering.)


text:
Acquired by | betaworks |
Price | $500k |
Date | 7/2012 |
Website | digg.com |
Blog | blog.digg.com |
@digg | |
Category | News/Media |
Phone | (415) 436-9638 |
firstname.lastname@example.com | |
Employees | 60 |
Founded | 10/2004 |
Description | user driven social content website |
Wefollow, 10/2009 |
Series A, 10/2005 Greylock Partners Omidyar Network Marc Andreessen Reid Hoffman Ron Conway Al Avery FLOODGATE SV Angel | $2.8M |
Series B, 12/2006 Greylock Partners Omidyar Network | $8.5M |
Series C, 9/2008 Highland Capital Partners Greylock Partners Omidyar Network SVB Financial Group | $28.7M |
Series D, 7/2011 | $5M |
Digg is a user driven social content website. Everything on Digg is user-submitted. After you submit content, other people read your submission and "Digg" what they like best. If your story receives enough Diggs, it's promoted to the front page for other visitors to see.
Kevin Rose came up with the idea for Digg in the fall of 2004. He found programmer Owen Byrne through eLance and paid him $10/hour to develop the idea. In addition, Rose paid $99 per month for hosting and $1,200 for the Digg.com domain. In December of 2004, Kevin launched his creation to the world through a post on his blog.
In February of 2005, Paris Hilton's cell phone was hacked. Images and phone numbers from the phone were posted online and it didn't take long for a user to post the link on Digg. The rapidshare downloads site started to receive an enormous amount of traffic and it was then, Rose says, he saw "the power of breaking stories before anyone else."
Digg has been a force ever since. Acquisition offers have been made, Rose was on the cover of BusinessWeek and according to Alexa, Digg is in the top 100 most trafficked sites on the internet. The success hasn't come without its share of problems though. The site has had to face services aimed at gaming the way stories hit the front page, as well as a user revolt. Digg has however been able to get over these hurdles as it continues to be one of the social news leaders.
This video was originally published on Beet.TV
Added: 9/25/08TechCrunch interview with Kevin Rose, April 2009
Added: 7/12/12Website | digg.com |
Blog | blog.digg.com |
Stage | Live |
Launch Date | November 1, 2004 |
Tags | news, social, community |
Digg delivers the most interesting and talked about stories on the Internet right now. The Internet is full of great stories, and Digg helps you find, read, and share the very best ones. It's simple and it's everywhere: visit Digg on the web, find it on your iPhone, or get the best of Digg delivered to your inbox with The Daily Digg.