Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
P

PingOfDeath1983

@PingOfDeath1983
About
Posts
2
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Change content in MainWindow / Navigation
    P PingOfDeath1983

    Hi, I cant figure out how to switch my customcontrols when clicking on a menubar-button. I have a MainWindow containing the following XAML:

    <DockPanel x:Name="MainWindow">

        <Menu Name="dropDownMenu"
              DockPanel.Dock="Top">
    
            <MenuItem Name="dropDownPage1" Header="File">
                <MenuItem Header="Page1" Click="dropDown\_Page1"/>
            </MenuItem>
    
            <MenuItem Name="dropDownPage2" Header="File">
                <MenuItem Header="Page2" Click="dropDown\_Page2"/>
            </MenuItem>
    
        </Menu>
        
        <Grid Name="gridMainContent" DockPanel.Dock="Top">
            <TextBlock>placeholder main content</TextBlock>
        </Grid>
        
        <Grid Name="gridStatusBar" DockPanel.Dock="Bottom">
            <TextBlock>placeholder statusbar</TextBlock>
        </Grid>
    </DockPanel>
    

    The task is when clicking on one menubutton i.e. "dropDown_Page1", changing the content of the grid "gridMainContent". Is there a way to place customcontrols into a grid without code in any *.cs File ? It would be wonderfull if somebody could help me on this. Cause I´m new to WPF, I welcome you to show me other ways of doing this! Thx! PingOfDeath

    WPF wpf csharp css help tutorial

  • MultiPage-Application - Navigation
    P PingOfDeath1983

    Hi, I cant figure out how to switch my customcontrols when clicking on a menubar-button. I have a MainWindow containing the following XAML:

    <DockPanel x:Name="MainWindow">

        <Menu Name="dropDownMenu"
              DockPanel.Dock="Top">
    
            <MenuItem Name="dropDownPage1" Header="File">
                <MenuItem Header="Page1" Click="dropDown\_Page1"/>
            </MenuItem>
    
            <MenuItem Name="dropDownPage2" Header="File">
                <MenuItem Header="Page2" Click="dropDown\_Page2"/>
            </MenuItem>
    
        </Menu>
        
        <Grid Name="gridMainContent" DockPanel.Dock="Top">
            <TextBlock>placeholder main content</TextBlock>
        </Grid>
        
        <Grid Name="gridStatusBar" DockPanel.Dock="Bottom">
            <TextBlock>placeholder statusbar</TextBlock>
        </Grid>
    </DockPanel>
    

    The task is when clicking on one menubutton i.e. "dropDown_Page1", changing the content of the grid "gridMainContent". Is there a way to place customcontrols into a grid without code in any *.cs File ? It would be wonderfull if somebody could help me on this. Cause I´m new to WPF, I welcome you to show me other ways of doing this! Thx! PingOfDeath

    C# wpf csharp css help tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups