Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cf32a7f
commit d0d65f3
Showing
28 changed files
with
653 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Dragablz" version="0.0.2.122" targetFramework="net45" /> | ||
<package id="MahApps.Metro" version="1.0.1-ALPHA040" targetFramework="net45" /> | ||
<package id="Dragablz" version="0.0.2.143" targetFramework="net45" /> | ||
<package id="MahApps.Metro" version="1.1.2.0" targetFramework="net45" /> | ||
</packages> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Dragablz" version="0.0.2.122" targetFramework="net45" /> | ||
<package id="MahApps.Metro" version="1.0.1-ALPHA040" targetFramework="net45" /> | ||
<package id="Dragablz" version="0.0.2.143" targetFramework="net45" /> | ||
<package id="MahApps.Metro" version="1.1.2.0" targetFramework="net45" /> | ||
</packages> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Dragablz" version="0.0.2.122" targetFramework="net40" /> | ||
<package id="Dragablz" version="0.0.2.143" targetFramework="net40" /> | ||
</packages> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Dragablz" version="0.0.2.122" targetFramework="net45" /> | ||
<package id="MahApps.Metro" version="1.0.1-ALPHA040" targetFramework="net45" /> | ||
<package id="Dragablz" version="0.0.2.143" targetFramework="net45" /> | ||
<package id="MahApps.Metro" version="1.1.2.0" targetFramework="net45" /> | ||
</packages> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Dragablz" version="0.0.2.122" targetFramework="net45" /> | ||
<package id="Dragablz" version="0.0.2.143" targetFramework="net45" /> | ||
</packages> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<Application x:Class="SidePanels.App" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:dragablz="http://dragablz.net/winfx/xaml/dragablz" | ||
xmlns:sidePanels="clr-namespace:SidePanels" | ||
StartupUri="MainWindow.xaml"> | ||
<Application.Resources> | ||
<ResourceDictionary> | ||
<ResourceDictionary.MergedDictionaries> | ||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" /> | ||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" /> | ||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.DeepPurple.xaml" /> | ||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Lime.xaml" /> | ||
<ResourceDictionary Source="pack://application:,,,/Dragablz;component/Themes/materialdesign.xaml" /> | ||
</ResourceDictionary.MergedDictionaries> | ||
<dragablz:InterTabController x:Key="InterTabController" x:Shared="False" MoveWindowWithSolitaryTabs="False"> | ||
<dragablz:InterTabController.InterTabClient> | ||
<sidePanels:MyInterTabClient /> | ||
</dragablz:InterTabController.InterTabClient> | ||
</dragablz:InterTabController> | ||
<Style TargetType="dragablz:TabablzControl" BasedOn="{StaticResource MaterialDesignTabablzControlStyle}"> | ||
<Setter Property="InterTabController" Value="{StaticResource InterTabController}" /> | ||
</Style> | ||
</ResourceDictionary> | ||
</Application.Resources> | ||
</Application> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Configuration; | ||
using System.Data; | ||
using System.Linq; | ||
using System.Windows; | ||
|
||
namespace SidePanels | ||
{ | ||
/// <summary> | ||
/// Interaction logic for App.xaml | ||
/// </summary> | ||
public partial class App : Application | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<Window x:Class="SidePanels.ChildWindow" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:dragablz="http://dragablz.net/winfx/xaml/dragablz" | ||
xmlns:sidePanels="clr-namespace:SidePanels" | ||
Title="ChildWindow" Height="300" Width="300"> | ||
<dragablz:TabablzControl x:Name="ChildWindowTabablzControl"> | ||
<dragablz:TabablzControl.InterTabController> | ||
<dragablz:InterTabController MoveWindowWithSolitaryTabs="True"> | ||
<dragablz:InterTabController.InterTabClient> | ||
<sidePanels:MyInterTabClient /> | ||
</dragablz:InterTabController.InterTabClient> | ||
</dragablz:InterTabController> | ||
</dragablz:TabablzControl.InterTabController> | ||
</dragablz:TabablzControl> | ||
</Window> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using System.Windows.Data; | ||
using System.Windows.Documents; | ||
using System.Windows.Input; | ||
using System.Windows.Media; | ||
using System.Windows.Media.Imaging; | ||
using System.Windows.Shapes; | ||
|
||
namespace SidePanels | ||
{ | ||
/// <summary> | ||
/// Interaction logic for ChildWindow.xaml | ||
/// </summary> | ||
public partial class ChildWindow : Window | ||
{ | ||
public ChildWindow() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<Window x:Class="SidePanels.MainWindow" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:dockablz="http://dragablz.net/winfx/xaml/dockablz" | ||
xmlns:dragablz="http://dragablz.net/winfx/xaml/dragablz" | ||
Title="MainWindow" Height="350" Width="525"> | ||
<Window.Resources> | ||
<ResourceDictionary> | ||
<ResourceDictionary.MergedDictionaries> | ||
<ResourceDictionary Source="pack://application:,,,/Dragablz;component/Themes/materialdesign.xaml" /> | ||
</ResourceDictionary.MergedDictionaries> | ||
<Style x:Key="SideTabItemStyle" TargetType="{x:Type dragablz:DragablzItem}" BasedOn="{StaticResource MaterialDesignDragableTabItemVerticalStyle}"> | ||
<Setter Property="Width" Value="40" /> | ||
</Style> | ||
</ResourceDictionary> | ||
</Window.Resources> | ||
<Grid> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="Auto" x:Name="LeftPanelColumnDefinition" /> | ||
<ColumnDefinition Width="4" /> | ||
<ColumnDefinition Width="*" /> | ||
</Grid.ColumnDefinitions> | ||
|
||
<!-- left panel make sure you configure exactly, and set up the IsEmptyChanged event --> | ||
<dragablz:TabablzControl x:Name="LeftPanelTabControl" | ||
TabStripPlacement="Left" | ||
ItemContainerStyle="{StaticResource SideTabItemStyle}" | ||
dragablz:DragablzItem.ContentRotateTransformAngle="90" | ||
IsEmptyChanged="LeftPanelTabControl_OnIsEmptyChanged"> | ||
<TabItem Header="AAA"> | ||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16" >Tab Page A</TextBlock> | ||
</TabItem> | ||
<TabItem Header="BBB"> | ||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16">Tab Page B</TextBlock> | ||
</TabItem> | ||
<TabItem Header="CCC"> | ||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16">Tab Page C</TextBlock> | ||
</TabItem> | ||
</dragablz:TabablzControl> | ||
|
||
<GridSplitter Grid.Column="1" ResizeDirection="Columns" ResizeBehavior="PreviousAndNext" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" /> | ||
|
||
<!-- Layout is optional, you could just have a TabablzControl --> | ||
<dockablz:Layout Grid.Column="2"> | ||
<dragablz:TabablzControl> | ||
<TabItem Header="One"> | ||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16">Tab Page One</TextBlock> | ||
</TabItem> | ||
<TabItem Header="Two"> | ||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16">Tab Page Two</TextBlock> | ||
</TabItem> | ||
<TabItem Header="Three"> | ||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16">Tab Page Three</TextBlock> | ||
</TabItem> | ||
</dragablz:TabablzControl> | ||
</dockablz:Layout> | ||
|
||
</Grid> | ||
</Window> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using System.Windows.Data; | ||
using System.Windows.Documents; | ||
using System.Windows.Input; | ||
using System.Windows.Media; | ||
using System.Windows.Media.Imaging; | ||
using System.Windows.Navigation; | ||
using System.Windows.Shapes; | ||
|
||
namespace SidePanels | ||
{ | ||
/// <summary> | ||
/// Interaction logic for MainWindow.xaml | ||
/// </summary> | ||
public partial class MainWindow : Window | ||
{ | ||
public MainWindow() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
private void LeftPanelTabControl_OnIsEmptyChanged(object sender, RoutedPropertyChangedEventArgs<bool> e) | ||
{ | ||
if (e.NewValue) | ||
LeftPanelColumnDefinition.Width = GridLength.Auto; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Media; | ||
using Dragablz; | ||
|
||
namespace SidePanels | ||
{ | ||
public class MyInterTabClient : IInterTabClient | ||
{ | ||
public INewTabHost<Window> GetNewHost(IInterTabClient interTabClient, object partition, TabablzControl source) | ||
{ | ||
var childWindow = new ChildWindow(); | ||
|
||
return new NewTabHost<Window>(childWindow, childWindow.ChildWindowTabablzControl); | ||
} | ||
|
||
public TabEmptiedResponse TabEmptiedHandler(TabablzControl tabControl, Window window) | ||
{ | ||
return window is MainWindow ? TabEmptiedResponse.DoNothing : TabEmptiedResponse.CloseWindowOrLayoutBranch; | ||
} | ||
} | ||
} |
Oops, something went wrong.