Bonjour,
J'ai commencé à coder une fenêtre de la façon suivante :
Avec menuITEM1_Click =
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 Window x:Class="APP1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="TITLE" Height="364" Width="610"> <DockPanel Background="DimGray"> <!--FOOTER--> <TextBlock DockPanel.Dock="Bottom" HorizontalAlignment="Center" Height="15"> Footer </TextBlock> <!--LEFT NAVIGATION MENU--> <StackPanel DockPanel.Dock="Left" Background="DimGray" Width="150"> <!--<TextBlock FontSize="12" FontWeight="Bold" TextAlignment="Center">MENU</TextBlock>--> <MenuItem Name="menuITEM1" Header="MENUITEM1" Margin="5,35,5,0" FontSize="10" Foreground="White" Click="menuITEM1_Click"></MenuItem> <MenuItem Name="MENUITEM2" Header="MENUITEM2" Margin="5,5,5,0" FontSize="10" Foreground="White"></MenuItem> </StackPanel> <!--TOP TITLE--> <TextBlock DockPanel.Dock="Top" Height="45" HorizontalAlignment="Center" VerticalAlignment="Center" FontFamily="Calibri" FontSize="24" FontWeight="Bold" Foreground="AliceBlue"> CORPORATE ACTIONS </TextBlock> <Frame Name="TargetFrame" Source="DefaultPage.xaml"></Frame> </DockPanel> </Window>
Je rencontre le problème suivant : lorsque je clique sur l'item la page xaml demandée est bien chargée mais une barre de navigation apparaît en haut du frame, or, je ne veux pas de cette barre.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 private void menuITEM1_Click(object sender, RoutedEventArgs e) { TargetFrame.Source= new Uri("MenuItem1.xaml", UriKind.Relative); }
Comment faire pour s'en débarrasser?
D'avance merci.
Partager