Friday, 14 March 2014

Creating Master Pages in Windows Presentation Foundation

  Master pages in ASP.NET 2.0 is one of the most used and important feature. Master pages allows to create a consistent look and feel of all the pages in the ASP.NET application. Unfortunately, there is no concept of master pages or master windows in Windows Presentation Foundation. In this article we are going to learn one easy way to create the master page equivalent in WPF

Introduction:

Master pages in ASP.NET 2.0 is one of the most used and important feature. Master pages allows to create a consistent look and feel of all the pages in the ASP.NET application. Unfortunately, there is no concept of master pages or master windows in Windows Presentation Foundation. In this article we are going to learn one easy way to create the master page equivalent in WPF.

Why Master Pages in WPF?

The main characteristic of master page is the consistent look and feel of the application. When developing WPF applications the most you can do is create style, themes etc. But you cannot control the layout of the page. This includes Header, Content, Footer etc.

Creating Master Page:

The concept behind creating a master page is simply adding a new custom control and exposing different regions using dependency properties. Check out the code below which is used to create the Header dependency property.


 public static readonly DependencyProperty HeaderProperty = DependencyProperty.Register("Header", typeof (Object), 

typeof(MasterWindow),

                                                                                               new UIPropertyMetadata());
 

        public object Header

        {

            get { return GetValue(HeaderProperty); }

            set { SetValue(HeaderProperty,value);}

        }


The MasterWindow is the name of the control. In the same way we can define the Content dependency property for our master window control.


 public static readonly DependencyProperty ContentProperty = DependencyProperty.Register("Content", typeof(Object),

                                                                                               typeof(MasterWindow),

                                                                                               new UIPropertyMetadata());
 

        public object Content

        {

            get { return GetValue(ContentProperty); }

            set { SetValue(ContentProperty, value); }

        }



The main purpose of Content property is to let the developer place the custom content in the child window . You can assume that this property is similar to the ContentPlaceHolder in ASP.NET which can be overridden by the developer.

The custom control also creates the Generic.xaml file automatically which is used to style the control. Let's add some style in the Generic.xaml file.



    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

    xmlns:WPF3D="clr-namespace:WPF3D">

 

    



The ControlTemplate tag contains the custom controls which will be used to create the display. Currently, there is a StackPanel which contains the Label for header region and the ContentPresenter control. The ContentPresenter is responsible for injecting the content at run time. The Content property is set to TemplateBinding Content which means it will get the data from the Content dependency property.

Our master page/window is complete now let's take a look at the window which will use this master control.

Creating Window to Use Master Window Control:

Add a simple WPF window to your application. Next we need to refer to the MasterWindow window. This can be performed by adding the clr-namespace attribute in the Window object. Take a look at the code below:

1"WPF3D.ChildWindow"
2    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4    Title="ChildWindow" Height="300" Width="300"
5         xmlns:m="clr-namespace:WPF3D">


The tag prefix "m" is to refer to the WPF3D namespace. Don't pay attention to 3D part of the namespace just think of it as a namespace.

Next, we need to add the MasterWindow on the page. This can be accomplished by using the following code:

1         
2             
3



As, you can see the Header portion of the page automatically appears since it was part of the MasterWindow window and was defined in the Generic.xaml file.

Now, let's some custom content to the Content part of the MasterWindow.

       

           

          
                 

               This is my content!

                 

            

            

             

   


In the above code we just added a simple TextBox in the MasterWindow.Content section. The output will be the following:



Now, you can achieve a consitent look and feel just like ASP.NET master pages.

Conclusion:

Although WPF does not provide any Master Pages like functionality out of the box but we can easily create this feature by using custom controls and dependency properties. Hopefully, this feature will be available in the new versions of the WPF framework.

Friday, 7 March 2014

Verified USA Paypal

Are You TIRED Of Waiting To Open and Verify A USA PayPal Account?

If Yes, then look no further.

My name is Taiwo Ibiyemi and I have opened and verified Functional/Accessible USA PayPal Account for hundreds of satisfied clients around the world since July, 2010 based on the NEW, UNUSUAL and DIFFERENT Strategies I invented myself. It's a fool-proof approach that has NEVER being matched by any living being in Nigeria.

I have developed a SECRET strategy of which I use to open and verify USA PayPal accounts successfully for hundreds of clients globally and I charge a lot for such service.

However, due to your URGENT need for a PayPal Account, I have devised a NEW Strategy to help you at a damn CHEAP Price.

a) I have decided to make PayPal Accounts using a DEDICATED IP access and keep.

b) You just pay a token fee (N10,000) and I deliver details to you through email with Instructions on How To Use It. It will take 3 - 7days to deliver after payment confirmation.

So, How Does It Go?

1. You place order by making payment through cash payment or bank transfer, Inters witch ATM payment or Liberty Reserve transfer.

2. Your payment is confirmed and I start processing.

3. I will open and verify a PayPal account using dedicated IP in that location.

4. I will use your names or other names to suit the situation.

5. When your job is successfully done, I will deliver your PayPal account details to you through email including:
a) PayPal login details
b) Email login details
c) Dedicated Virtual Private Network (VPN) details for access without limitation.
d) Virtual Bank Account details used in verifying the PayPal account
d) A well-detailed instruction on how to use your new USA PayPal account to avoid unnecessary limitation
e) Where to fund your PayPal for online payments.
f) How to withdraw from Paypal.

6. You will get all these info and your USA PayPal account within 3 to 7 working days.

To avoid being charged N15,000 in the next 10days,pay N10,000 and make the payment to the bank without delay.

Once I get your payment (payment must be done within 2 working days of placing order), I do all my best and fulfill your order within 3 - 7 working days.

See below for a screenshot of one of my client’s Paypal accounts:
A Client’s Paypal Account


Do you observed the word in red circle? This is to show that it is a verified Paypal account. So to get yourself a verified Paypal account right here in Nigeria, pay me to do it for you for a very cheap price.

How Much?

Normally, I do charge N15,000 for a Non-US Verified Paypal account. But if you are paying today, pay N10, 000 only.

For a very limited time, you can pay N10,000 to get yourself a verified Paypal account and there will never be any kind of limitations (if you do it right). But if you need the ebook to do it yourself then click HERE

To pay for your Paypal account, go to my bank account details page to get my bank details and make a payment.click here to pay now.

You will get your VERIFIED PAYPAL ACCOUNT within the next 4 days of payment confirmation.
Your Partner In Success

Windows 9, price and Microsoft's Innovator's Dilemma

The details around Windows 9---code named "Threshold"---are beginning to emerge, but the real action will go well beyond features and whether Microsoft can put Windows 8 in the rear view mirror. Microsoft's real challenge with Windows will be navigating a classic innovator's dilemma and how it can thread a needle between preserving a cash cow and ultimately give Windows away to hardware makers.
Give Windows away for free?!? What?!? How?!?
That place is where Microsoft is going to have to go if it wants to preserve its Windows ecosystem and market share. And how Microsoft navigate that business model change is going to be telling. The folks in Redmond may laugh off the idea of giving Windows away for free to original equipment manufacturers, but the writing is on the wall. Consider:
  • Apple doesn't charge for its Mac OS anymore. 
  • Google Chromebooks have become more popular. 
  • PC makers are now adding Android desktop systems because they can customize and probably get better margins. 
  • Price will be king in the PC market and Android and Chromebooks could be counterweight to Microsoft
  • Mobile operating systems are driving computing. 
  • Windows 8 was a black eye for Microsoft and it's going to be a challenge to come back from a Vista-ish flop twice. 
  • The PC market is being splintered into multiple operating systems.
When I consider those moving parts, it's not that surprising that Microsoft is having trouble naming a new CEO. It's going to suck to be the new CEO. For starters, Microsoft isn't that screwed up so a new leader can't be a hero. Think John Chen at BlackBerry. Chen has little downside. If he turns around BlackBerry he's a legend. If BlackBerry fails Chen carries none of the blame.

What's Hot on ZDNet

  • Porn ban: Twitter talks about Vine's new 'no porn' policy
  • Top Android smartphones (March 2014 edition)
  • Microsoft's new tack for cheap tablets: Windows 8.1 with Bing
  • Third cryptocurrency exchange becomes hacking victim, loses Bitcoin
Microsoft's new CEO will have to preserve two cash cows---Windows and Office---be saddled with low-margin Nokia and most likely keep the company together when a breakup may make more sense. With Microsoft more can go wrong on the new CEO's watch than go right.
Windows 9 comes into view: Microsoft to share Windows Threshold plans at Build 2014 show: Report | Should Windows consumer and enterprise flavors remain in sync? | Microsoft codename 'Threshold': The next major Windows wave takes shape 
In Clay Christensen's books on innovation there's a theme that plays out repeatedly. A leader in an industry is threatened from below by rivals. Those rivals use price as a weapon and gain share. The leaders move upstream to preserve margins. The upstarts move upmarket and the leader has no space to maneuver. An example of this scenario was the U.S. auto industry as Toyota and Honda entered the market. The PC and server markets are also examples as contract equipment players ultimately become brands.
Speaking at the Gartner Symposium and ITXpo in 2011, Christensen noted:
"If you're worried about what may kill you, look down."
Down to Microsoft's Windows is Android and Google's Chromebook franchise. Chromebooks have become more popular and functional. Android is emerging as a PC option. Both of Google's computing operating systems are free to hardware makers. Microsoft can pitch Windows as a premium OS, but the margins will be increasingly difficult to defend.
The move for Microsoft will be to off Windows free to hardware makers and profit from the ecosystem---subscriptions, apps and other revenue streams. Here's the problem: Windows is a huge business. Microsoft will have to preserve and navigate a move to free with precision timing.
In a research note a week ago, Stifel Nicolaus analyst Brad Reback made the case the Windows will eventually be free.
Today, when looking at the aggregate OS market (phone/tablet/PC), Microsoft is the only vendor that explicitly charges for the OS software. We believe this could prove untenable in coming years, forcing Microsoft to give away the OS and attempt to monetize Windows usage/support via various methods depending on the end-customer. We believe this is the single biggest challenge Microsoft's new CEO will face in coming years.
At the very least, Windows average selling prices will tank. There's no other outcome. To fend off Chromebooks and now Android, Microsoft will have to give concessions to hardware makers so they can offer sub $300 devices. Reback argued that Microsoft's OS license fees will fall to $10 to $30 for each device down from $40 today. Those concessions, however, are just the beginning.
Reback continued:
Over the medium to longer term, we believe Microsoft will be forced to follow Apple and Google and give away the OS, especially in the consumer market, and use services like Bing, Skype, Office 365, etc. as its primary monetization engine. That said, we expect Enterprises to continue to pay for support via various enterprise agreements.
The good news for Microsoft is that it'll be able to milk Windows on the enterprise side for the foreseeable future.
Frankly, I don't see many holes in Reback's case. The only debatable point about Windows going free for the consumer market is timing. This chart tells the tale:
windows free

Why Google's Chromebook Is Better than Windows, Mac and Android

NEW YORK (TheStreet) -- Public perception typically lags reality. As such, there are still a lot of people who don't know anything about Google's (GOOG_) PC operating system, Chrome OS.
They don't know what it is, or why they would want it. They haven't tried it.
Yet, at the same time, Google's laptops -- made by Samsung and Acer -- are now the two top sellers on Amazon.com, and six out of the top 14 are Google Chromebooks. Talk to many schools and you'll see them either throwing out Microsoft (MSFT_) and Apple (AAPL_) products already, or plotting to replace them with Chromebooks in the next year or two.
While there is no substitute for actually trying the product, I will try to sort out the two main questions most people tend to have about Chromebooks:
1. Why would I want a Chromebook when I can just run Chrome on my Mac or Windows laptop?
2. Why is Chrome OS better than Google's other operating system, Android?
Let's start with the first one: Why is Chrome OS better than Mac and Windows?

How to get an Approved Adsense Account in 1 hour?

I am not publishing much articles these days because I am busy in designing templates and completing the requests of my clients. Today, I have got some relief and thus publishing an important article about getting an Approved Adsense Account in 1 hour. I was getting several request, Where user asked me to provide some easiest method for getting an Approved Adsense Account.
How to get an Approved Adsense Account in 1 hour?
Image Creditweb Matser Facts
Google Adsense is undoubtedly one of the best Ad network for bloggers and Web Masters but getting an approved adsense account was never an easy procedure. However, those days are passed and now, You can get an Approved Adsense Account in 1 hour. Isn’t that unbelievable? But it is true. In this post, I will show you “How to get an Approved Adsense Account in 1 hours?
You Might Also LikeHow to sell Ad spaces in Low Traffic Blogs?
How to get an Approved Adsense Account in 1 hour?
You can get an Approved Adsense Account in 1 hours through the help of YouTube Monetization method. The whole procedure is shown below:
  • First of all, Create a New GMail Account.  If you haven’t used your Old GMail account for Monetization then you can also use your Old account as well. If your country is not supported by Adsense then choose a country like US and UK, while creating New GMail Account.
  • Login to your “YouTube” Account by visiting https://www.youtube.com/
  • Visit http://youtube.com/account_monetization
  • Enable “Monetization” for your YouTube Account. The screenshot for doing the same is given below:
Enable Monetization in YouTube
  • After that, You will have to “Accept” all terms and condition. The screenshot of the same is given below:
Accept Terms and Condition in YouTube
  • Finally, Click on “Monetize” Button. The screenshot of the same is given below:
Click on Monetize button on YouTube
  • After doing that, You will receive an EMail in your Inbox.
  • Now, Upload a Unique video in your YouTube Account. While doing that, Don’t forget to add appropriate description and Tags for videos. Wait for the upload to get completed. Once done, Publish it.
  • To associate an Adsense Account, Visit https://www.youtube.com/account_monetization and expand the topic “How Will I be Paid” and click on the link “Associate an Adsense Account“. The screenshot of the same is given below:
Associate an Adsense Account in YouTube
  • Now, You will be redirected to a screen, Where you will have to set up your Adsense Account. Click on “Continue” button for filling your other details such as Address, Country, Payee Name etc
apply for adsense
  • After clicking on “Continue” button, You will see the below given screen. Enter all details correctly.
fill adsense aplication form form 6
  • After filling all details, Click on “Submit” button. Wait for 1-2 hours. You will get an EMail containing the details of  an Approved Adsense Account. Hurray….Hurray…enjoy.
 You Might Also LikeGoogle Adsense Pin not received-What to do next?
How to Use this Adsense Account for Displaying in your Blog and Website?
  • Login to your Adsense Account
  • Click on “Account Settings” option on Home Page. The screenshot of the same is given below:
Account Settings in Adsense
  • Move to “Access and Authorization” section. You will find this section at the end of “Account Settings” Page.
  • Click on “Edit” link which appears next to “Only host sites are allowed to show ads for your account” option.
  • Now, Add the url of your website(where you want to show Ads) on “Show Ads on Other Website” Page. You have done most of your work.
  • Finally, Create an Ad Unit and implement the code in your website.. Enjoy.
  • If you want to display Adsense Ads on Blogger Blog, Simply Associate your Adsense Account with blogger.
You Might Also LikeHow people fool others by showing high Adsense Earnings per day?
From the Editor’s Desk
The above described method for getting an Approved Adsense Account in 1 hour is the easiest one. Anyone can easily get an Approved adsense account. The method is tested and 100% working. However, Always follow the terms and condition of Adsense otherwise they will ban your account without any pre-warning.
Simply Give it a try and post your comments.