Click here to Skip to main content
15,907,183 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi, can you create a new page in wpf without any style? In a wpf using a window you make the style none, however on a page I can't see how this can be done.

cheers.
Posted
Updated 16-Jun-11 0:23am
v2
Comments
Ubloobok 16-Jun-11 9:27am    
Maybe change the text of the question please?
I can not fully understand what you need.
The value ​​of 'Style' property that were null or something else?
DanHodgson88 16-Jun-11 10:12am    
Sorry. What I mean to say is. Is it possible to remove the default windows styling from a page such as the back and forward buttons the surrounding windows border and the min/max buttons in the corner? I know you can do it with a window but can't seem to edit the properties on a page. I'm looking to set a custom background to change the shape of the window.
Ubloobok 16-Jun-11 10:33am    
You can set:

NavigationWindow.ShowsNavigationUI = false.
Window.WindowStyle = WindowStyle.None;

Will display only the content without the navigation buttons at the top.
Are you looking for this?
DanHodgson88 16-Jun-11 10:57am    
yes bud, but I don't think you can set: Window.WindowStyle = WindowStyle.None; because it isn't a window its a page and doesn't contain the property for this.

1 solution

Page has the property 'ShowsNavigationUI' too.
Application always has the main window, which can be of two types:
1)Window.
2)NavigationWindow.
'NavigationWindow' inherited from 'Window'.

If you want to hide all navigation UI, then use this code:
((NavigationWindow)Application.Current.MainWindow).ShowsNavigationUI = false;

If you want to hide navigation UI only at one page, then:
this.ShowsNavigationUI = false;
Where 'this' is the 'Page'.

This property hide navigation UI, but window will have minimize button and other.
Then you can use:
((Window)Application.Current.MainWindow).WindowStyle = WindowStyle.None.ShowsNavigationUI = false;
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900