SHARE
TWEET

Horizontal Autocollapse

a guest Apr 27th, 2018 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <Grid
  2.    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3.    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  4.    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5.    xmlns:sys="clr-namespace:System;assembly=mscorlib"
  6.    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  7.    xmlns:zones="clr-namespace:LostTech.Stack.Zones;assembly=Stack"
  8.    mc:Ignorable="d"
  9.    zones:Layout.Version="2"
  10.    Width="1024" Height="576"
  11.    d:DesignWidth="1024"
  12.    d:DesignHeight="576"
  13. >
  14.   <!-- ===================================================================== -->
  15.   <!-- ! This file is overwritten after every update. Please, modify a copy! -->
  16.   <!-- ===================================================================== -->
  17.   <Grid.Resources>
  18.     <ResourceDictionary>
  19.       <sys:Double x:Key="GripSize">80</sys:Double>
  20.       <sys:Double x:Key="GripFontSize">40</sys:Double>
  21.     </ResourceDictionary>
  22.   </Grid.Resources>
  23.  
  24.   <Grid.ColumnDefinitions>
  25.     <ColumnDefinition>
  26.       <ColumnDefinition.Style>
  27.         <Style>
  28.           <Setter Property="ColumnDefinition.Width" Value="1*"/>
  29.           <Style.Triggers>
  30.             <DataTrigger Binding="{Binding Items.Count, ElementName=SideTabs}" Value="0">
  31.               <Setter Property="ColumnDefinition.Width" Value="0"/>
  32.             </DataTrigger>
  33.           </Style.Triggers>
  34.         </Style>
  35.       </ColumnDefinition.Style>
  36.     </ColumnDefinition>
  37.  
  38.     <ColumnDefinition Width="3*"/>
  39.   </Grid.ColumnDefinitions>
  40.   <Grid Grid.Column="1">
  41.     <Grid.RowDefinitions>
  42.       <RowDefinition Height="Auto"/>
  43.       <RowDefinition Height="*"/>
  44.     </Grid.RowDefinitions>
  45.  
  46.     <zones:WindowTabs>
  47.       <zones:WindowTabs.ItemsSource>
  48.         <CompositeCollection>
  49.           <CollectionContainer Collection="{Binding Windows, Source={x:Reference Main}}"/>
  50.           <CollectionContainer Collection="{Binding Windows, Source={x:Reference LeftMain}}"/>
  51.           <CollectionContainer Collection="{Binding Windows, Source={x:Reference RightMain}}"/>
  52.           <CollectionContainer Collection="{Binding Windows, Source={x:Reference TopMain}}"/>
  53.           <CollectionContainer Collection="{Binding Windows, Source={x:Reference BottomMain}}"/>
  54.         </CompositeCollection>
  55.       </zones:WindowTabs.ItemsSource>
  56.     </zones:WindowTabs>
  57.  
  58.     <zones:Zone x:Name="Main" Grid.Row="1"/>
  59.  
  60.     <Grid Grid.Row="1">
  61.       <Grid.ColumnDefinitions>
  62.         <ColumnDefinition Width="*"/>
  63.         <ColumnDefinition Width="*"/>
  64.       </Grid.ColumnDefinitions>
  65.       <Grid.RowDefinitions>
  66.         <RowDefinition Height="*"/>
  67.         <RowDefinition Height="*"/>
  68.       </Grid.RowDefinitions>
  69.  
  70.       <zones:Zone x:Name="LeftMain" Grid.Column="0" Grid.RowSpan="2"/>
  71.       <zones:Zone x:Name="RightMain" Grid.Column="1" Grid.RowSpan="2"/>
  72.       <zones:Zone x:Name="TopMain" Grid.Row="0" Grid.ColumnSpan="2"/>
  73.       <zones:Zone x:Name="BottomMain" Grid.Row="1" Grid.ColumnSpan="2"/>
  74.  
  75.       <zones:Zone Grid.Column="0" Grid.Row="0"/>
  76.       <zones:Zone Grid.Column="1" Grid.Row="0"/>
  77.       <zones:Zone Grid.Column="0" Grid.Row="1"/>
  78.       <zones:Zone Grid.Column="1" Grid.Row="1"/>
  79.  
  80.       <zones:Zone Grid.Column="0" Grid.RowSpan="2"
  81.                    Margin="{Binding Source={StaticResource GripSize}, Converter={StaticResource ThicknessConverter}}"
  82.                    Target="{Binding ElementName=LeftMain}"/>
  83.       <zones:Zone Grid.Column="1" Grid.RowSpan="2"
  84.                    Margin="{Binding Source={StaticResource GripSize}, Converter={StaticResource ThicknessConverter}}"
  85.                    Target="{Binding ElementName=RightMain}"/>
  86.  
  87.       <Border Grid.Row="0" Grid.ColumnSpan="2" HorizontalAlignment="Center" Width="{StaticResource GripSize}" Background="#44F"
  88.                zones:Layout.IsHint="True">
  89.         <!-- Find more symbols from Segoe UI Symbol in Character Map app -->
  90.         <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center"
  91.                   FontFamily="Segoe UI Symbol" Foreground="White" Text="" FontSize="{StaticResource GripFontSize}"/>
  92.       </Border>
  93.       <zones:Zone Grid.Row="0" Grid.ColumnSpan="2"
  94.                    HorizontalAlignment="Center" Width="{StaticResource GripSize}"
  95.                    Target="{Binding ElementName=TopMain}"/>
  96.       <Border Grid.Row="1" Grid.ColumnSpan="2" HorizontalAlignment="Center" Width="{StaticResource GripSize}" Background="#44F"
  97.                zones:Layout.IsHint="True">
  98.         <!-- Find more symbols from Segoe UI Symbol in Character Map app -->
  99.         <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center"
  100.                   FontFamily="Segoe UI Symbol" Foreground="White" Text="" FontSize="{StaticResource GripFontSize}"/>
  101.       </Border>
  102.       <zones:Zone Grid.Row="1" Grid.ColumnSpan="2"
  103.                    HorizontalAlignment="Center" Width="{StaticResource GripSize}"
  104.                    Target="{Binding ElementName=BottomMain}"/>
  105.     </Grid>
  106.  
  107.     <Border Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center"
  108.            zones:Layout.IsHint="True"
  109.            Width="160" Height="160" Background="#44F">
  110.       <!-- Find more symbols from Segoe UI Symbol in Character Map app -->
  111.       <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center"
  112.                   FontFamily="Segoe UI Symbol" Foreground="White" Text="" FontSize="80"/>
  113.     </Border>
  114.     <zones:Zone Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center"
  115.                Width="160" Height="160"
  116.                Target="{Binding ElementName=Main}"/>
  117.   </Grid>
  118.  
  119.   <Grid>
  120.     <Grid.RowDefinitions>
  121.       <RowDefinition Height="Auto"/>
  122.       <RowDefinition Height="*"/>
  123.     </Grid.RowDefinitions>
  124.  
  125.     <zones:WindowTabs x:Name="SideTabs">
  126.       <zones:WindowTabs.ItemsSource>
  127.         <CompositeCollection>
  128.           <zones:ZoneElement Content="{Binding ViewModel, Source={x:Reference SideStack}}"/>
  129.           <CollectionContainer Collection="{Binding Windows, Source={x:Reference SideSingle}}"/>
  130.         </CompositeCollection>
  131.       </zones:WindowTabs.ItemsSource>
  132.     </zones:WindowTabs>
  133.  
  134.     <Grid Grid.Row="1">
  135.       <zones:Zone x:Name="SideSingle" Id="Side" />
  136.       <zones:Zone x:Name="SideStack" Id="Side Stack">
  137.         <zones:Zone.Layout>
  138.           <ItemsPanelTemplate>
  139.             <UniformGrid Columns="1"/>
  140.           </ItemsPanelTemplate>
  141.         </zones:Zone.Layout>
  142.       </zones:Zone>
  143.  
  144.       <!-- Canvas is visible even though its container is collapsed -->
  145.       <Canvas x:Name="DropOverlay"
  146.              HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
  147.              zones:Layout.IsHint="True">
  148.         <zones:Zone Target="{Binding ElementName=SideStack}" MinWidth="160"
  149.                    Width="{Binding ActualWidth, ElementName=DropOverlay}"
  150.                    Height="{Binding ActualHeight, ElementName=DropOverlay}"/>
  151.  
  152.         <Grid MinWidth="160"
  153.              Width="{Binding ActualWidth, ElementName=DropOverlay}"
  154.              Height="{Binding ActualHeight, ElementName=DropOverlay}"
  155.              HorizontalAlignment="Stretch">
  156.           <Border Height="160" Width="160" Background="#44F">
  157.             <!-- Find more symbols from Segoe UI Symbol in Character Map app -->
  158.             <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center"
  159.                       FontFamily="Segoe UI Symbol" Foreground="White" Text="" FontSize="80"/>
  160.           </Border>
  161.  
  162.           <zones:Zone HorizontalAlignment="Center" VerticalAlignment="Center"
  163.                      Height="160" Width="160"
  164.                      Target="{Binding ElementName=SideSingle}"/>
  165.         </Grid>
  166.       </Canvas>
  167.     </Grid>
  168.   </Grid>
  169. </Grid>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top