To render a chromeless window, with full behavior Neutronium.SPA.Demo
- uses Neutronium built-in chromeless behavior on the main window to set-up WPF behavior.
<xmlns:WPF="clr-namespace:Neutronium.WPF;assembly=Neutronium.WPF" x:Class="Neutronium.SPA.Demo.MainWindow"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
BorderThickness="1"
Title="MainWindow">
<i:Interaction.Behaviors>
<WPF:Chromeless />
</i:Interaction.Behaviors>
- uses
-webkit-app-region
CSS property to define draggable zone on the HTML window:
#top-menu > div{
-webkit-app-region: drag;
}
#top-menu > div > button{
-webkit-app-region: no-drag;
}
- uses a dedicated Vue.js component: topMenu.vue bound to a WindowViewModel to allow to minimize/maximize/close the corresponding window.
<v-toolbar id="top-menu" app >
<icon-button :command="window.Minimize" icon="remove">
</icon-button>
<icon-button :command="window.Normalize" :icon="middleIcon">
</icon-button>
<icon-button :command="window.Close" icon="close">
</icon-button>
</v-toolbar>
Back to README