1

I am new to UWP and when I click a button inside the frame I need to open a screen on top of that from parent page.I have put the grid inside the frame and it worked but the opened page is not full screen. So I need to place the grid on the parent page and so that the opened (maybe change the visibility) is in full screen. Anyway to access parent element from inside of a frame? I have tried calling a parent function from frame and its execute but the grid visibility is not changed.Any idea?

sadik
  • 107
  • 10
  • Actually it's not clear about what you really want to do. If you want a popup view to full screen, a better idea should be using UWP multiple view https://learn.microsoft.com/en-us/windows/uwp/design/layout/show-multiple-views It can have a standalone view and you can make it full screen. So can be you be specific about your requirement first? – Barry Wang Sep 13 '18 at 07:21

1 Answers1

0

within the constructor or onLoaded of your parent page, assign that Grid to a public static member;

public static Grid PublicParentGrid;// this will be the static field within your parent page.

public ParentPage()
{
    InitializeComponent();
    PublicParentGrid = ParentGrid;// ParentGrid is the x:Name you defined for your grid.
}

now this publicparentgrid can be accessed from child page which is within the frame, like ParentPage.PublicParentGrid.Visibility .....

Muhammad Touseef
  • 4,357
  • 4
  • 31
  • 75