Styling the Oxyplot tooltip and showing on mouse hover ( WPF)

While using chart controls for one of my WPF projects, I had to use Oxyplot graph controls. I came across an issue as to how to style the tooltip and show the tooltip on mouse hover . Below is the solution.

How to style the tooltip and show it on mouse hover of the series ? 

I am styling a plot which shows line series with X and Y axis.The two line series are bound to ObservableCollection<DataPoint> . All the dynamicresource and staticresource bindings of styles are present in a common resourcedictionary. You’ll can add your own style . Below is the style shown for OxyPlot plot which styles the tracker element and tooltip .

  1. Define it either in resourcedictionary or in usercontrol.resources section.
  2. xmlns:oxy=”clr-namespace:OxyPlot.Wpf;assembly=OxyPlot.Wpf” Add this namespace.
  3. <Style
    TargetType=”{x:Type oxy:Plot}”>
    <Setter Property=”DefaultTrackerTemplate”>
    LineExtents=”{Binding PlotModel.PlotArea}”
    Position=”{Binding Position}”><Border
    <Grid Margin=”6″>
    <RowDefinition />
    <RowDefinition />
    <ColumnDefinition />
    <ColumnDefinition />
    Style=”{StaticResource NormalTextStyle}”
    Text=”X :” />
    Style=”{StaticResource NormalTextStyle}”
    StringFormat={}{0:0.##}}” />
    Style=”{StaticResource NormalTextStyle}”
    Text=”Y :” />
    Style=”{StaticResource NormalTextStyle}”
    StringFormat={}{0:0.##}}” />




  4. XAML for oxplot graph which shows line series bound to collections and styled with resources declared in our common file.
  5. <oxy:Plot
    Style=”{StaticResource PlotStyle}”
    TextColor=”{DynamicResource UI.ColoursDefault}”>
    Color=”{DynamicResource UI.ColoursOrange}”
    MarkerFill=”{DynamicResource UI.ColoursOrange}”
    MarkerType=”Circle” />
    Color=”{DynamicResource UI.ColoursBlue}”
    MarkerFill=”{DynamicResource UI.ColoursBlue}”
    MarkerType=”Circle” />
    AxislineColor=”{DynamicResource UI.ColoursDefault}”
    TicklineColor=”{DynamicResource UI.ColoursDefault}” />
    AxislineColor=”{DynamicResource UI.ColoursDefault}”
    TicklineColor=”{DynamicResource UI.ColoursDefault}” />
  6. To show the tooltip on mouse hover below is code written in code-behind.
  7. this.PlotPlane.ActualController.UnbindMouseDown(OxyMouseButton.Left);
  8. capture

    An oxyplot graph with styled series , styled tooltip shown on mouse hover. The tracker is also styled.


Service Method hits twice. On client side you get “Bad request ” HTTP request…


You send the correct parameters to your asynchronous post operation, you verify all the parameters are set. You debug the method giving “Bad request error” message and find , the debug point is being hit , but it is being hit twice ..

You check all the service method calls, but at every place, they are called only once.. So what’s the reason of service method being hit twice…

When writing contracts for your services, do check for these two important points.

1) KnownType Attribute  – Incase your result is a user defined class with collection of more user defined classes, include all the classes and their collections using this attribute. If any type is missed the service method cannot recognize the type and gets hit twice .

2) Every class being passed in service method should be decorated with DataContract. If not you might face above issue.

ASP.NET MVC4 and jQuery Mobile.

With the ever increasing number of devices native application development for every device has become time-consuming and costly. The need of hour is to have a single codebase that can target multiple platforms. The session below shows how you can leverage ASP.NET MVC 4 and jQuery Mobile to build applications ready for mobile devices .
To get started you need :
1) Visual Studio 2010 with Service Pack 1 or Visual Studio 2012
3) jQuery Mobile
4) Opera Mobile Emulator for Windows
5) Default agent switcher for Mozilla Firefox

References :
ASP.NET MVC4 in Action
Pro jQuery Mobile

Coded UI

Coded UI is a UI testing framework.

Prerequisites for Coded UI :

Visual Studio 2012 or Visual Studio 2010 Premium or Ultimate. Incase you have not installed full versions of the Visual Studio 2010, install feature pack 2 for Visual Studio from here.

What can you do with Coded UI ?


Demo : Testing Bing using Coded UI.

Open Visual Studio 2012. After installation you will see Coded UI Test project template in Test.


Select the first option to record.

The panel below has 4 options :

1) Record actions 2) Show Recorded Steps 3) Add Assertions 4) Generate Code .


Open browser and type and click record.

Steps to record :
1) Type Visual Studio 2010 in the search box.
2) Click Search.
3) Click on back button of browser. Run the tests.
NOTE: While running the tests , the state of UI has to be same as and when recorded, so that the running test can locate the search box and execute tests.Else tests might fail.

Below is the project structure.
CodedUITest1.cs – code for running tests.
UIMap.uitest – xml file which records actions on user interface.testprojectstructure

Making your UI Test Data Driven.
Open Excel and enter data for your search list.
Save it as Data.csv. Add Data.csv to your project. Set its properties. Set Build Action to Content and Copy to Output Directory to Copy Always.

Add the attribute above your test method to take input values from the Data.csv file .datasource

To take data from excel sheet , you will have to set the parameters as below.

“|DataDirectory|\\Data.csv”, “Data#csv”,
public void CodedUITestMethod1()
this.UIMap.TestBingParams.UIEnteryoursearchtermEditText = TestContext.DataRow[“SearchText”].ToString();

Run your tests. There you have data driven tests for Bing UI. Your search will be done for all the inputs.

Posted in Uncategorized. Leave a Comment »

Storyboarding with Powerpoint

A storyboard lets you present your idea with use of shapes,figures and drawings. You can share your experiences,illustrate a user story or explain your requirements to your customers with a storyboard.

The new visual studio suite has got this new feature called as Storyboarding with Powerpoint.

So how to create a storyboard.

Click the new menu “Powerpoint Storyboarding “in the Visual Studio suite.


Click on the Storyboarding option on the ribbon in Powerpoint.


The “Storyboard shapes” section gives you loads of shapes,icons etc. to drag and drop shapes on the slide to create storyboard.


Below is a rough drawing created out of the shapes dragged from the Shapes pane to create a mock Website.

Shapes added to make the drawing :

Web browser,Tab Group,Search Box, Web Ad, Text


So go ahead and try out this cool feature … Happy Storyboarding…. 🙂

Posted in Uncategorized. Leave a Comment »

Let’s talk……..

After reformating your PC or mobile phone, the first thing you check out is internet connectivity and test it.

The best option… is to communicate with your friends online….

The current scene is that you have already opened up multiple accounts,

one for your relatives,…..

other for your college friends,….

another to get connected with your loved ones…..

This list is endless.

This is acceptable, as everyone wants privacy and priviledge to talk with person he/she wants to communicate.

But installing messengers for every account created is a tedious process.

You give up….. with a thought “why did I create so many at start” ….

There is a solution to this problem .. 🙂

Go for instant messengers which can add all your accounts created.

How do they work?

1) Install the software which supports multiple accounts on your PC/mobile or use web based softwares.

2) Add the accounts you have created.

Conventions used while adding accounts:

Protocol or Accounts : GMAIL,HOTMAIL,FACEBOOK,YAHOO,Gadu,Gadu.

UserName : your login name for each of the above accounts.

Password : password for each.

3) You are done. Get connected.. with the group you wish to chat 🙂

Mapping Domain Expertise to Software Applications

Many times when developers code for an application, they fail to understand what is expected as the end result and what has to be showcased.

Every line of code written has to be as per the business rules and should fulfill expectations of the clients and customers.

Then how does the developer understand what to code?

Who is going to give him knowledge about do’s and dont’s in coding ………

Answer is Domain Experts.

A domain expert has profound knowledge on one subject.

They are encyclopedia and in a particular area of endeavor.

Mapping domain expertise to software applications is a well-planned process.

Below are few points to get you started in absence of domain experts  :

1) Read well,before you code.

2) Document “references” in excel sheets. References could be links you visit,e-books, online newsletters your read to gain information about the project.

3) Share your views and opinions with your peers and seniors. Get into group discussions and ask for

4) Draw architecture diagrams to give yourself a better picture of coding rightly as per the business rules in the coming
iterations of the projects.

5) Once the aim of the project is clear , understand functional specifications .

6) Optimize and improve performance as per the business rules of your project.

Below is the pictorial representation for above steps.