Showing posts with label learn c-sharp. Show all posts
Showing posts with label learn c-sharp. Show all posts

Friday, January 13

Paint Application in WPF (XAML) and C# Code

Hello guys, today i'm gonna show you how to make a simple paint application in wpf application using XAML for its GUI and c# for its back end coding, this application is equipped with Buttons, labels and InkCanvas,
so lets start it, first of all open MS visual Studio C# 2010, open a new project (WPF application), you will be shown a window, in the designer window we will make GUI of application, here is the screenshot, you have to follow these steps to make this application.
  • Divide your main Grid into two columns by writing this code

            <Grid.ColumnDefinitions >
                  <ColumnDefinition Width="100*" />
                    <ColumnDefinition Width="425*" />
                  </Grid.ColumnDefinitions>


          Sunday, October 23

          Characters Validation in Name field using C-sharp Language

          The following program is to validate name field. There is a methods which is user defined named as checkEntry which is taking string as an argument. In this method a loop is used which is starting from 0 to string length. Code is pretty simple and anyone can understand it very easily. You will some useless variable and class in this code. You do not need to create another class and user defined method. This can be done in main method. Copy code from user defined method and paste it in main method and handle this in a loop as per requirement i have used 'while' loop here.

          Saturday, October 22

          Parsing the most commonly used technique in c-Sharp and Higher Level Languages


          Parsing term actually refers to the coversion from one data type to another. In programming parsing technique is very important while concering with user data of different data types. You need to convert a string containing char digits into an integer, allowing you to use a numeric value. There are several methods, such as int.Parse, that are ideal for this. Here we look at three useful methods that are effective, assuming your code must only accept very simple input strings, using code in the C# programming language.

          String input data:
          "999" // input is integer
          "-26" //input is signed integer
          "abc" //string is the input value
          "0.123" //input is of float type