Wednesday 27 May 2015

Element Binding in Xaml

XAML element binding allows binding of different elements through properties which means providing value to particular element from another element's value.
Following code describes this process in which font size of text block is bound to value property of slider element.

1  >Open Visual Studio
2  >Start new project
3 >Select windows phone app And choose blank page
4 >Open MainPage.xaml from solution explorer 
Now copy and past following code.


<Grid>
        <Slider Minimum="40" Maximum="100" Name="slider1"></Slider>
       <TextBlock FontSize="{Binding Value, ElementName=slider1}" Text="simple text"></TextBlock>
    

</Grid>

The above code shows that the value of font size will be increased as the slider moves.


Flip View Controls using xaml (windows phone + store)

In old days we use pivot controls and panorama for representation of data in windows phone (silver light). But now a days these controls are replaced by Filp View controls. Here is short code snippet that shows how to use Hub controls in windows phone + store apps.

The code is quite easy to understand and self explanatory.


<FlipView>
<FlipViewItem>
<TextBlock FontSize=”400″ HorizontalAlignment=”Center” VerticalAlignment=”Center”>Apple</TextBlock>
</FlipViewItem>
<FlipViewItem>
<TextBlock FontSize=”400″ HorizontalAlignment=”Center”
VerticalAlignment=”Center”>Ball</TextBlock>
</FlipViewItem>
</FlipView>

Hub Control using xaml (windows phone + store)


In old days we use pivot controls and panorama for representation of data in windows phone (silver light). But now a days these controls are replaced by Hub controls. Here is short code snippet that shows how to use Hub controls in windows phone + store apps.

The code is quite easy to understand and self explanatory.


<Hub Header="Virtual University of Pakistan">
<HubSection Width="400" Header="Student"></HubSection>
<HubSection Header="Roll No"></HubSection>
<HubSection Header="Courses"></HubSection>
</Hub>

Sunday 25 January 2015

Enabling Hyper-V for use on Windows 8.1 (step by step)

So what is Hyper-V?
 
Windows 8.1 includes HyperV, the same machine virtualization technology that is part of Windows Server. HyperV lets you run more than one 32-bit or 64-bit x86 operating system at the same time on the same PC, by running them inside a virtual machine.

How to enable Hyper-V.......

Step 1: Prerequisites
Following prerequisites are required to successfully run Client Hyper-V on Windows 8.1:
  • Windows 8 64 bit Operating System
  • 4GB system RAM at minimum
  • BIOS-level Hardware Virtualization support
     
Step 2: Setting Up Hyper-V
  1. Ensure that hardware virtualization support is turned on in the BIOS settings.

 http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-48-12/6116.HVW8a.jpg 

        2.Save the BIOS settings and boot up the machine normally.
        3. Than go to control panel >> program>> program and feature>> Turn windows feature on and off.
        4. Select and Enable Hyper-V.
      




http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-48-12/4276.HVW8b.jpg

      5. If Hyper-V was not previously enabled reboot the system to apply the changes.

 Note:
If Client Hyper-V isn't supported on your hardware, you'll be alerted when you attempt to install the components.