Tuesday 12 July 2016

Android Advantages and Dis-advantages

Advantages of having android phones:


1. Android is open Because
it is linux based open source so its applications can be developed by anyone.

2. Multitasking Android
phones can run many applications, it means you can browse while listened to the song or you can browse, Facebook while listened to the song.

3. Easy access to thousands of applications via the Google Android Android App Market With
Google's Android App Market you can download many applications for free. There are many
thousands of applications and games that are ready for download on Android phones

4. Can install a modified ROM 
We sometimes find an unofficial ROM. That is the version that was not in accordance with the specification release our cell phones, the last way is modification.Do not worry there are many custom ROM that you can use on Android phones, and guaranteed not to harm your device.

5. Phone options are diverse 
 Android is available on mobile phones from various manufacturers, from Sony Ericsson, Motorola, HTC and Samsung. And each handset manufacturer also presents an Android phone in the style of each, such as HTC with its HTC sense, Sony Ericsson with its Timescape. So You can freely choose the Android phone in accordance with the ‘brand’ favorite.

6. Ease of notification Any
SMS, Email, or even the latest news and weather forecast, there will always be a notification on the Home Screen Android phone, do not miss the LED indicator is blinking, so you will not miss a single SMS, Email or even Missed call.

7. Widget
 With the widgets on the homescreen, You can easily access a variety of settings
quickly and easily.

8.Google Maniac
 If you are a loyal user of Google services ranging from Gmail to Google Reader Android phone has integrated with Google services, so you can quickly check email from Gmail.

9.Supports 2D, 3D graphics 
It supports various platforms like 2D and 3D. Earlier we used to watch movies and play games in almost in 2D, but nowadays various applications are using 3D format. To provide different graphics in videos, games OS should support 3D format. Android supports 2D And 3D format to provide a better advantage in videos and in games.

10. Supports Multiple Languages Android
supports different languages. We can say all famous languages about more than 100. By using this feature it is easy to adopt to different languages. Earlier in the feature phones English is to be the only language in the mobile devices.

11. Video Calling Faster
Data connection enables to do video call. We can take advantage of bandwidth and new generation networks using Android.


Disadvantage

1. Need internet connection Android
requires an active internet connection. At least there should be a GPRS internet connection in your area, so that the device is ready to go online according to our needs.

2. Advertising Application
In the Android phones can indeed be obtained easily and for free, but the consequences in each of these applications, will always be ads on display, either the top or bottom of the application.

3. Battery Problem Android
More wasteful than any other operating system,because this operating system is a lot of "process" in the background that lead to the battery quickly drains.

4. Many applications contain virus
The virus inserted android applications including Counter Strike Ground Force, Puzzles, Photo Game, etc. Android Application contain virus also present in the Android Market.

5. Data Connection Android
has large number of background process which runs in the background, which eats so much mobile data. And thus cost lots of money if you are not into unlimited data plan.

6. Slow response Compared
to ‘ios’ of apple,windows 8 of Microsoft.when we open same app in the ios and windoes 8. We observe the slow response of the android when we open apps in the different platforms.

7 . Heating Problem Compared
to other operating systems android makes use of processes very efficient. This makes processor to get heat. Some hardware companies take care to reduce heat,but it went in vain when we operate it a long time and at low battery.

8 . Application Quality Application
Quality is not so good.There is no standard for these applications.Few application roam with the memory Leaks and Crashes

9 . Force Close on Large App/Games
This is another drawbacks of android OS, When you run large apps/Games most of the time android shows error force close which is definitely annoying. However this is not always the case with high end devices.

10. 1000s of apps of with the same functionality.

WPF Button with Image and Text

<Button x:Name="Image_Button" Height="100" Width="230">
        <Button.Template>
                <ControlTemplate TargetType="Button">
                    <StackPanel Orientation="Horizontal"
                                Background="SkyBlue">
                        <Image Name="Button_Image"
                               Margin="5,0,0,0"
                               Source="Button.png"
                               HorizontalAlignment="Center"
                               Width="95"
                               Height="95"
                               VerticalAlignment="Center"
                               Visibility="Visible" />
                        <TextBlock x:Name="HomeText"
                                   Text="Button"
                                   VerticalAlignment="Center"
                                   HorizontalAlignment="Center"
                                   FontSize="34"
                                   Foreground="White"
                                   Margin="10,0,0,0"
                                   FontWeight="SemiBold"/>
                    </StackPanel>
                </ControlTemplate>
          </Button.Template>
 </Button>



Output :






Monday 11 July 2016

WPF Transparent Button Style


        <Style x:Key="TransparentButtonStyle" 
               TargetType="{x:Type Button}">
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="Foreground" Value="Black"/>
            <Setter Property="BorderBrush" Value="Transparent"/>
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="HorizontalContentAlignment" Value="Center"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="Padding" Value="10 5"/>
            <Setter Property="FontSize" Value="12" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Grid>
                            <Border x:Name="Border"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}" />

                            <ContentPresenter x:Name="content"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                Margin="{TemplateBinding Padding}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                RecognizesAccessKey="True" />
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsPressed" Value="True">
                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter Property="BorderThickness" Value="0"/>
                                <Setter Property="Background" Value="#CCCCCC" TargetName="Border"/>
                                <Setter Property="Opacity" Value="1" TargetName="Border"/>
                                <Setter Property="Foreground" Value="Black"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Foreground" Value="#ADADAD"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Button  Style="{StaticResource TransparentButtonStyle}" HorizontalAlignment="Left" Margin="251,112,0,0" VerticalAlignment="Top" Width="154" Height="68" Content="Button">



Metro Style WPF window Sample

<Window x:Class="WpfApplication2.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow"
        Height="350"
        Width="525"
        Background="Gray"
        AllowsTransparency="True"
        WindowStyle="None"
        MouseLeftButtonDown="Window_MouseLeftButtonDown"
        WindowStartupLocation="CenterScreen"
        ResizeMode="CanMinimize">
    <Window.Resources>
        <Style x:Key="TransparentButtonStyle"
               TargetType="{x:Type Button}">
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="Foreground" Value="Black"/>
            <Setter Property="BorderBrush" Value="Transparent"/>
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="HorizontalContentAlignment" Value="Center"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="Padding" Value="10 5"/>
            <Setter Property="FontSize" Value="12" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Grid>
                            <Border x:Name="Border"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}" />

                            <ContentPresenter x:Name="content"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                Margin="{TemplateBinding Padding}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                RecognizesAccessKey="True" />
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsPressed" Value="True">
                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter Property="BorderThickness" Value="0"/>
                                <Setter Property="Background" Value="#CCCCCC" TargetName="Border"/>
                                <Setter Property="Opacity" Value="1" TargetName="Border"/>
                                <Setter Property="Foreground" Value="Black"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Property="Foreground" Value="#ADADAD"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>
    <Grid>
        <Button x:Name="CLOSE_BUTTON"
                Style="{StaticResource TransparentButtonStyle}"
                VerticalAlignment="Top"
                HorizontalAlignment="Right"
                Background="Transparent"
                Height="30"
                Width="30"
                Click="Close_Click">
        <Path Data="F1M54.0573,47.8776L38.1771,31.9974 54.0547,16.1198C55.7604,14.4141 55.7604,11.6511 54.0573,9.94531 52.3516,8.23962 49.5859,8.23962 47.8802,9.94531L32.0026,25.8229 16.1224,9.94531C14.4167,8.23962 11.6511,8.23962 9.94794,9.94531 8.24219,11.6511 8.24219,14.4141 9.94794,16.1198L25.8255,32 9.94794,47.8776C8.24219,49.5834 8.24219,52.3477 9.94794,54.0534 11.6511,55.7572 14.4167,55.7585 16.1224,54.0534L32.0026,38.1745 47.8802,54.0534C49.5859,55.7585 52.3516,55.7572 54.0573,54.0534 55.7604,52.3477 55.763,49.5834 54.0573,47.8776z"
              Stretch="Uniform"
              Fill="Red"
              Width="10"
              Margin="0,0,0,0">
        </Path>
        </Button>

    </Grid>
</Window>


.cs file

        private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.DragMove();
        }
       
        private void Close_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

Output: