Finding it impossible to add some buttons

Hi

I have spend well over an hour trying to add my own buttons to a copy of the MediaPlayerDetails.xaml template and I am finding it impossible.

I wanted to add two buttons next to the slider.

Seems to be related to the Columns of that grid ?

The buttons are never seen in the emulator preview.

Can someone save my sanity ?

Thank you.

MediaPlayerDetailsLoungeChromeCast.xaml (30.4 KB)

Hide or Lock those “Sound Mode” & “Device is off” panels in the Outline. They are on top of the volume controls thus blocking access in the main design view.

If you are designing a custom Chromecast template, you could just delete those panels. Neither of them are going to be used by a Google Cast device.

I’m really struggling with this.

The “Device is Off” panel I’d like to keep as I’ve linked that to my Harmony activity switch for the ChromeCast activity.

I’ve hidden the Sound Modes and the grid above it but I still cannot see my two new buttons.

Look closer at my screenshot. You don’t have the correct Grid highlighted. “Device is off” is a child of the one you have selected.

Doesn’t make any difference

Looks like your screenshots were taken while running. You need to add your button during Design time. Stop the simulator.

I already added the buttons

Look at your Margins & Column assignments. You haven’t assigned the correct Grid.Column number & your margins are huge. Reset your Margins & assign the column number & it should work.

I think Grid.Column is the key thing I was missing and didn’t know about.

There are four columns in this grid.

The buttons looks correct now in design mode and in the preview.

I set the Up arrow button to be Grid.Column 2 and the Down arrow button to be Grid.Column 3.

I’ve reset the margins on the buttons also.

image

Thank you, I was pulling my hair out, as I couldn’t work out how to get the button in to the right position within the grid without altering the margins of the buttons.