Saturday, September 14, 2013
Friday, September 6, 2013
http://www.galaxywebmind.com/ SUCCESSIVE LAUNCH:
http://www.galaxywebmind.com/
GALAXY WEB MIND & THE SMS PANEL ON LIVE
http://sms.galaxywebmind.com/

Wednesday, August 28, 2013
http://www.galaxywebmind.com/
The Galaxy Group of Companies
added new venture on SMS platform galaxywebmind.com
www.galaxywebmind.com
Pure Web/Windows/Mobile/SMS/Marketting/ Solutions
Thank you.
Wednesday, February 27, 2013
WPF: Showing Tooltip on a disabled element
WPF: Showing Tooltip on hovering over disabled element
Syntax:
<Button ToolTipService.ShowOnDisabled="True"></Button>
Or from C# code, you can call the static method corresponding to the attached property:
ToolTipService.SetShowOnDisabled(myButton, true);
Note: If you want to close the tooltip that is currently showing then,
Set its IsOpen property to false.
Wednesday, April 4, 2012
Understanding Predicate Delegates in C#
Saturday, February 18, 2012
When should I use WPF...?
When should I use WPF instead of DirectX? (Is DirectX dead?)
DirectX is a low-level interface to the graphics hardware that exposes all of the quirks of
whatever GPU a particular computer has. DirectX can be thought of as assembly language in
the world of graphics: You can do anything the GPU supports.
WPF provides a high-level abstraction that takes a description of your scene and
figures out the best way to render it, given the hardware resources available. Internally, this
might involve using Shader Model 3.0, or the fixed-function pipeline, or software. (Don’t worry if you’re not familiar with these terms, but take it as a sign that you should be using WPF!).
The downside of choosing DirectX over WPF is a potentially astronomical increase in development cost. A large part of this cost is the requirement to test your application on each
driver/GPU combination you intend to support. One of the major benefits of building on top of WPF is that Microsoft has already done this testing for you! You can instead focus your
testing on low-end hardware for measuring performance. The fact that WPF applications can
even leverage the client GPU over Remote Desktop or in a partial-trust environment is also a
compelling differentiator.
You can put Flash-based content on a website with confidence that the overwhelming
majority of visitors already have the necessary player installed. (And if they don’t, it’s a very
quick download.)
WPF applications can also run within a web browser. WPF has the advantage of better development
tools and programming model, a richer feature set, robust control reuse, broad
programming language support, and full access to the underlying platform (when security
permits). But viewing such content requires Windows and the .NET Framework 3.0 (installed
by default on Windows Vista or later).
Friday, February 17, 2012
Anup Shah on WPF and Silverlight: Architecture...
![]() |
Above figure shows the overall architecture of WPF. It has three major sections presentation core, presentation framework and milcore. In the same diagram we have shown how other section like direct a...
![]()
Google+ makes sharing on the web more like sharing in real life. Learn more.
Join Google+ |
| You have received this message because Anup Shah shared it with anupshah2it.netspider@blogger.com. Unsubscribe from these emails. | ![]() |
Architecture Of WPF
User32:- It decides which goes where on the screen.
DirectX: - As said previously WPF uses directX internally. DirectX talks with drivers and renders the content.
Milcore: - Mil stands for media integration library. This section is a unmanaged code because it acts like a bridge between WPF managed and DirectX / User32 unmanaged API.
Presentation core ;- This is a low level API exposed by WPF providing features for 2D , 3D , geometry etc.
Presentation framework:- This section has high level features like application controls , layouts . Content etc which helps you to build up your application
Wednesday, February 15, 2012
Ques.
DataReader is like a forward only recordset. It fetches one row at a time so very less network cost compare to DataSet(Fethces all the rows at a time). DataReader is readonly so we can't do any transaction on them. DataReader will be the best choice where we need to show the data to the user which requires no transaction. As DataReader is forward only so we can't fetch data randomly. .NET Data Providers optimizes the datareader to handle huge amount of data.
DataSet
=======
DataSet is an in memory representation of a collection of Database objects including tables of a relational database schemas.
DataSet is always a bulky object that requires a lot of memory space compare to DataReader. We can say that the DataSet is a small database because it stores the schema and data in the application memory area. DataSet fetches all data from the datasource at a time to its memory area. So we can traverse through the object to get the required data like querying database.
What is the difference between app.config, web.config and machine.config ?
************************************************************
In this .NET Interview questions interviewer expects two things. First the importance of configuration and second in which scenarios are the above file applicable. So lets answer the question in two parts.
App.config, web.config and machine.config are files which store configuration data in XML
Machine.config file stores configuration information at system level. It can contain configuration information like timeout in ASP.NET application, requestLimit, memoryLimit, and ClientConnectedCheck etc.
************************************************************
What is Encapsulation?
***********************************************************
- Encapsulation is one of the fundamental principles of object-oriented programming.
- Encapsulation is a process of hiding all the internal details of an object from the outside world
- Encapsulation is the ability to hide its data and methods from outside the world and only expose data and methods that are required
- Encapsulation is a protective barrier that prevents the code and data being randomly accessed by other code or by outside the class
- Encapsulation gives us maintainability, flexibility and extensibility to our code.
- Encapsulation makes implementation inaccessible to other parts of the program and protect from whatever actions might be taken outside the function or class.
- Encapsulation provides a way to protect data from accidental corruption
- Encapsulation hides information within an object
- Encapsulation is the technique or process of making the fields in a class private and providing access to the fields using public methods
- Encapsulation gives you the ability to validate the values before the object user change or obtain the value
- Encapsulation allows us to create a "black box" and protects an objects internal state from corruption by its clients.
Wednesday, February 1, 2012
DataContext
WPF provides a simple and powerful way to auto-update data between the business model and the user interface. This mechanism is called DataBinding. Everytime when the data of your business model changes, it automatically reflects the updates to the user interface and vice versa. This is the preferred method in WPF to bring data to the user interface.
Databinding can be unidirectional (source -> target or target <- source), or bidirectional (source <-> target).
The source of a databinding can be a normal .NET property or a DependencyProperty. The target property of the bindingmust be a DependencyProperty.
To make the databinding properly work, both sides of a binding must provide a change notification that tells the binding when to update the target value. On normal .NET properties this is done by raising the PropertyChanged event of theINotifyPropertyChanged interface. On DependencyProperties it is done by the PropertyChanged callback of the property metadata
Databinding is typically done in XAML by using the {Binding} markup extension. The following example shows a simple binding between the text of a TextBox and a Label that reflects the typed value:
Every WPF control derived from FrameworkElement has a DataContext property. This property is meant to be set to the data object it visualizes. If you don't explicity define a source of a binding, it takes the data context by default.
The DataContext property inherits its value to child elements. So you can set the DataContext on a superior layout container and its value is inherited to all child elements. This is very useful if you want to build a form that is bound to multiple properties of the same data object.
ValueConverters
If you want to bind two properties of different types together, you need to use a ValueConverter. A ValueConverter converts the value from a source type to a target type and back. WPF already includes some value converters but in most cases you will need to write your own by implementing the IValueConverter interface.
A typical example is to bind a boolean member to the Visibility property. Since the visibility is an enum value that can be Visible, Collapsed or Hidden, you need a value converter.
The following example shows a simple converter that converts a boolen to a visibility property. Note that such a converter is already part of the .NET framework.
-> you can derive your value converter from MarkupExtension and return its own instance in the ProvideValueoverride. So you can use it directly without referencing it from the resources.
-> When you get the error "No constructor for type '...' has 0 parameters.", you need to add an default constructor to your converter, even it's not needed. Just for the WPF designer.
WPF - Basic layout using the Grid
Your application layout is one of the first things you have to plan before starting the actual development. In this basic tutorial, I will show you how to design a basic layout for your applications using the Grid control.
First of all, we will need to create a new WPF Application project. To do so, fire up Visual Studio and select File > New > Project... Choose WPF Application and click OK. Once your project has been created, we will change the size of our application window so we can better see our progress as shown in the following code snippet:
<Window x:Class="WPFBasicLayout.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="WPF Basic Layout" Height="350" Width="500"> <Grid></Grid> </Window>
Notice that Visual Studio automatically places a Grid control for us. The Grid is the most complex layout control and probably the one we will use the most. Our next task is to declare columns and rows definitions inside our Grid. The idea is to have four parts in our application: the header, the footer, a sidebar and the main content.
<Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition /> <RowDefinition /> </Grid.RowDefinitions>
So far, our window should look like this in the Visual Studio designer:
To keep this tutorial simple, we will use Border and Label controls as the content of the four parts of our application. We will add one Border and a Label for each part of our application. Notice how we place them in the row and column we want using Grid.Row and Grid.Column properties respectively:
<Border Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" BorderBrush="LightBlue" BorderThickness="2,2,2,2" CornerRadius="10,10,10,10" Margin="05,05,05,05"> <Label FontSize="24" VerticalAlignment="Center" HorizontalAlignment="Center">Header</Label> </Border> <Border Grid.Column="0" Grid.Row="1" BorderBrush="LightBlue" BorderThickness="2,2,2,2" CornerRadius="10,10,10,10" Margin="05,05,05,05"> <Label FontSize="24" VerticalAlignment="Center" HorizontalAlignment="Center">Sidebar</Label> </Border> <Border Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" BorderBrush="LightBlue" BorderThickness="2,2,2,2" CornerRadius="10,10,10,10" Margin="05,05,05,05"> <Label FontSize="24" VerticalAlignment="Center" HorizontalAlignment="Center">Footer</Label> </Border> <Border Grid.Column="1" Grid.Row="1" BorderBrush="LightBlue" BorderThickness="2,2,2,2" CornerRadius="10,10,10,10" Margin="05,05,05,05"> <Label FontSize="24" VerticalAlignment="Center" HorizontalAlignment="Center">Main Content</Label> </Border>
Notice also the Grid.ColumnSpan property. That means that that specific column will take two columns, beginning from the one it was placed. This happens with the header and the footer because we want then to take all the width they have available.
In future posts, I will show you how to move those repeated properties into Styles for cleaner code.
Our application is getting the look we are looking for, but as you can see we got some problems: the header and the footer are too big and the sidebar and the main content are taking the same space. What we want is a smaller header and footer and a thinner sidebar, so the room left is taken by the main content. In order to get the desired effect, we need to add Width and Height properties to some of the ColumnDefinition and RowDefinition elements respectively. We will set those properties to Auto for the the first column and for the first and third row. That way, the header, the footer and the sidebar will resize accordingly based on the size of their content. All the room left will be available for the main content.
<Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition /> <RowDefinition Height="Auto"/> </Grid.RowDefinitions>
Now it is time to run our application and check the final result. As you can see, the layout is pretty basic but quite common and useful. Notice how the different parts of our application are resized accordingly when the application is resized or maximized.
Now that you have this basic layout set up, it is up to you to add controls, images and text to improve the results.
Tuesday, January 31, 2012
WPF Commanding: The Basics
Commanding in WPF is unlike your traditional events in WinForms. Commands were primarily designed to be used at the application level, but they have become one of the most popular features among developers when it comes to UI programming (we tend to use them more than they should be). Commands enable the developer to define a task once and “attach” it multiple times without having to go through the traditional means which would require duplicating the code or even calling it in more than one place. (This is the magic.) WPF intrinsically provides five commands that you can use out of the box.
ApplicationCommandsComponentCommandsEditingCommandsMediaCommandsvNavigationCommands
I have explored them and have taken a liking to ApplicationCommands. (In fact this is the one that most developers will use.)
To use the command, do the following:
- Link your custom/predefined command to a control that you want to respond to the command and add an input gesture to the command.
- Create a handler for the command and use the
CommandBindingsclass to bind the handler to the control. - Add the binding to the control’s Commands collection.
So let’s delve into some code to demonstrate WPF commanding.
WPF Basics
Definition
“The Windows Presentation Foundation is Microsofts next generation UI framework to create applications with a rich user interface.”
History
Before the release of WPF, UI developers used to concentrate on various services or API to develop desktop applications to produce simple application to high end graphic application. So it was highly necessary for any developer to concentrate on one or more services or API for building high end graphics.
Developers used to concentrate on many API’s to achieve desired functionality and make UI more attracitve
Forms Dialog boxes ,controls — VB6 MFC
2D Graphics System.Drawing.dll
3D Graphics DirectX
Streaming Video Windows Media Player API
FLow/Mixes Documents PDFs API
In WPF all these is achieved with only Windows Presentation Foundation Framework



