Question: By default the next item in wp7 panorama bleeds into the currently selected panorama item by a few pixels and I would like to show a bit more of the next item.

Is there a way to control the amount of pixels? I tried setting margins and paddings and tried editing the controlTemplate, but had no success.

Answer: 
You are confusing virtual functions calls and overload resolution.

All derived classes have vtables containing all virtual functions, from the base class and any additional own virtual functions. This is used to resolve calls at **runtime**, like in your case 2).

In case 1) you get an error from overload resolution at **compile time**. Due to name hiding, class `Derived` only has one callable function. Your only choice is to call that function, with an `int*`.
Since you declared the second `obj` as a `Base*`, the vtable gives it all the methods of `Base`. Although for virtual methods which have been overriden by `Derived`, the overriden versions are called, the other methods (or method overloads) are still those that have been declared in `Base`.

However, if you declared the pointer as `Derived*`, the vtable will give it the methods of `Derived`, hiding the ones that had the same name in `Base`. Hence, `obj->gogo(7);` will not work. Similarly, this is also illegal:

```
Base* obj = new Derived();

// legal, since obj is a pointer to Base, it contains the gogo(int) method.
obj->gogo(7); 

// illegal, it has been cast into a pointer to Derived. gogo(int) is hidden.
(reinterpret_cast<Derived*>(obj))->gogo(7);

```

This is legal:

```
Derived* obj = new Derived ;
obj->Base::gogo(7); // legal.

```

See [here](http://ideone.com/CA9DM).