Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Organising TabItems vertically don't change they layout. #16

Closed
tmichaluk opened this issue Mar 31, 2015 · 5 comments
Closed

Organising TabItems vertically don't change they layout. #16

tmichaluk opened this issue Mar 31, 2015 · 5 comments

Comments

@tmichaluk
Copy link

No description provided.

@tmichaluk
Copy link
Author

issue

@ButchersBoy
Copy link
Owner

OK...I'll need to update the material design theme. About 75% of the code is there to do vertical tabs, so this is the prompt I needed to get the last 25% finished.

@tmichaluk
Copy link
Author

Could you evaluate how much time could it take? Thanks for quick support btw.

@ButchersBoy
Copy link
Owner

I'll have a blast for a bit tonight, then i'm off on holidays for a long weekend...so maybe a week or two, unless I make really good progress tonight. there could be a bit of technicality when tabs tear out etc.

@ButchersBoy
Copy link
Owner

Here we go:

verticaldragmaterialdesign

This only works for tab strip placement left right now in the material design theme. Also, some of the mouse positioning when tearing out isn't quite right, but this will improve over time. You may want to resize the tabs to suit your app. To do that you'll need to inherit one of the styles and set the widths heights as in this XAML:

<Window x:Class="MaterialDesignTabExample.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:dragablz="clr-namespace:Dragablz;assembly=Dragablz"
        Title="Material Design Demo" Height="350" Width="525">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/Dragablz;component/themes/materialdesign.xaml" />
            </ResourceDictionary.MergedDictionaries>            
        </ResourceDictionary>
    </Window.Resources>
    <dragablz:TabablzControl TabStripPlacement="Left">
        <dragablz:TabablzControl.ItemContainerStyle>
            <Style TargetType="{x:Type dragablz:DragablzItem}" BasedOn="{StaticResource MaterialDesignDragableTabItemVerticalStyle}">
                <Setter Property="Width" Value="100" />
                <Setter Property="Height" Value="40" />
            </Style>
        </dragablz:TabablzControl.ItemContainerStyle>
        <dragablz:TabablzControl.InterTabController>
            <dragablz:InterTabController />
        </dragablz:TabablzControl.InterTabController>
        <TabItem Header="HELLO">
            <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">Hello World</TextBlock>
        </TabItem>
        <TabItem Header="MATERIAL">
            <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">Material Design</TextBlock>
        </TabItem>
        <TabItem Header="DESIGN">
            <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">Looks Quite Nice</TextBlock>
        </TabItem>
    </dragablz:TabablzControl>
</Window>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants