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 want to override overloaded function but hiding rules don't work like this.

"The hiding rule says that an entity in an inner scope hides things with the same name in an outer scope."

Note, it is irrelevant that it has different signature i.e. `gogo(int* a)` will hide all `gogo(whatever)` functions from the Base. Overriding occurs only when your functions have same name, same signatures and virtual (so, only `gogo(int* a)` will be overrided).

The C++FAQ book suggest to use "non-virtual overloads that call non-overloaded virtuals." (chapter 29.05). Basically you create non-virtual overloaded functions in base class:

`gogo(int a) and gogo(int* a)`

which will call virtual functions respectively:

> 
> virtual gogo\_i(int a) and virtual gogo\_pi(int\* a)
> 
> 
> 

And override this virtuals in Derived class.
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).