GithubHelp home page GithubHelp logo

yuanyesong / wpfchrometabs-mvvm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sskodje/wpfchrometabs-mvvm

0.0 2.0 0.0 940 KB

A tab control based on WPF chrome tabs, modified to work with the MVVM pattern

License: MIT License

C# 100.00%

wpfchrometabs-mvvm's Introduction

WPF Chrome Tabs - MVVM

A tab control based on WPF chrome tabs, modified to work with the MVVM pattern. WPF chrome tabs is a tab control modeled after the tabs in Google's Chrome browser.

New features include:

  • Support for dragging tabs to new windows, and snapping them back into tabs.
  • Bindable property to lock tabs
  • Bindable property to show/hide "add tab" button
  • Bindable property for selected tab brush
  • Bindable property to drag window instead when dragging the last remaining tab.

Available on NuGet.

The basic functionality can be done as simple as :

    xaml:
    xmlns:ct="clr-namespace:ChromeTabs;assembly=ChromeTabs"

    <ct:ChromeTabControl ItemsSource="{Binding ItemCollection}"
                         SelectedItem="{Binding SelectedTab}"
                         AddTabCommand="{Binding AddTabCommand}"
                         CloseTabCommand="{Binding CloseTabCommand}">
                         
    viewmodel: 
    public ObservableCollection<MyTabClass> ItemCollection { get; set; }
    public MyTabClass SelectedTab { get; set; }
    (...)
    void CloseTabCommandAction(MyTabClass tab)
    {
        ItemCollection.Remove(tab);
    }
    void AddTabCommandAction()
    {
        ItemCollection.Add(New MyTabClass());
    }

See the demo project for advanced functionality like tab tearing, snapping windows to tabs, tab reordering, context menus and more.

Example

wpfchrometabs-mvvm's People

Contributors

sskodje avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.