Skip to content

Latest commit

 

History

History
47 lines (35 loc) · 1.48 KB

Chromeless.md

File metadata and controls

47 lines (35 loc) · 1.48 KB

Neutronium.SPA.Demo

Chromeless

To render a chromeless window, with full behavior Neutronium.SPA.Demo

  1. 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>
  1. 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;
}
  1. 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