Skip to content

Commit 52a0f5b

Browse files
committed
Sample has been successfully committed.
1 parent ebf2f3a commit 52a0f5b

File tree

15 files changed

+553
-0
lines changed

15 files changed

+553
-0
lines changed
58 KB
Binary file not shown.

TabControlAlignment/.vs/TabControlAlignment/v16/Server/sqlite3/db.lock

Whitespace-only changes.
Binary file not shown.

TabControlAlignment/App.config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
5+
</startup>
6+
</configuration>

TabControlAlignment/App.xaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Application x:Class="TabControlAlignment.App"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:local="clr-namespace:TabControlAlignment"
5+
StartupUri="MainWindow.xaml">
6+
<Application.Resources>
7+
8+
</Application.Resources>
9+
</Application>

TabControlAlignment/App.xaml.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Configuration;
4+
using System.Data;
5+
using System.Linq;
6+
using System.Threading.Tasks;
7+
using System.Windows;
8+
9+
namespace TabControlAlignment
10+
{
11+
/// <summary>
12+
/// Interaction logic for App.xaml
13+
/// </summary>
14+
public partial class App : Application
15+
{
16+
}
17+
}
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
<Window x:Class="TabControlAlignment.MainWindow"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6+
xmlns:local="clr-namespace:TabControlAlignment"
7+
xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
8+
WindowStartupLocation="CenterScreen"
9+
mc:Ignorable="d"
10+
Title="MainWindow" Height="450" Width="800">
11+
<Window.Resources>
12+
<Style x:Key="NewtabControlExtStyle" TargetType="syncfusion:TabControlExt">
13+
<Setter Property="BorderThickness" Value="1"/>
14+
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
15+
<Style.Triggers>
16+
<MultiDataTrigger>
17+
<Setter Property="Template">
18+
<Setter.Value>
19+
<ControlTemplate TargetType="{x:Type syncfusion:TabControlExt}">
20+
<Grid x:Name="TabControlGrid" Background="{TemplateBinding Background}" ClipToBounds="False" SnapsToDevicePixels="True" KeyboardNavigation.TabNavigation="Local">
21+
<Grid.ColumnDefinitions>
22+
<ColumnDefinition x:Name="ColumnDefinition0"/>
23+
<ColumnDefinition x:Name="ColumnDefinition1" Width="0"/>
24+
</Grid.ColumnDefinitions>
25+
<Grid.RowDefinitions>
26+
<RowDefinition x:Name="RowDefinition0" Height="Auto"/>
27+
<RowDefinition x:Name="RowDefinition1" Height="*"/>
28+
</Grid.RowDefinitions>
29+
<syncfusion:HeaderPanel x:Name="HeaderPanel" Background="{TemplateBinding TabPanelBackground}" Grid.Column="0" Focusable="False" HorizontalAlignment="Stretch" Grid.Row="0" VerticalAlignment="Stretch" Panel.ZIndex="1">
30+
<syncfusion:TabPanelAdv x:Name="PART_TabPanel" DockPanel.Dock="Right" Focusable="False" HorizontalAlignment="Center" Style="{TemplateBinding TabPanelStyle}" VerticalAlignment="Stretch">
31+
<syncfusion:TabScrollViewer x:Name="PART_ScrollViewer" Focusable="False" HorizontalScrollBarVisibility="Hidden" Margin="{Binding Margin, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ContentPresenter}}}" PanningMode="HorizontalFirst" VerticalScrollBarVisibility="Hidden">
32+
<syncfusion:TabLayoutPanel x:Name="PART_TabLayoutPanel" AllowDrop="True" ClipToBounds="True" HorizontalAlignment="Left" IsItemsHost="True" Margin="0,2,2,-1" KeyboardNavigation.TabIndex="1" VerticalAlignment="Top"/>
33+
</syncfusion:TabScrollViewer>
34+
</syncfusion:TabPanelAdv>
35+
</syncfusion:HeaderPanel>
36+
<syncfusion:Border3D x:Name="ContentPanel" AllowDrop="True" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.Column="0" CornerRadius="2" KeyboardNavigation.DirectionalNavigation="Contained" Margin="0,1,0,0" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
37+
<Border x:Name="PART_ContentPanelBorder" BorderBrush="#FF69A1BF" BorderThickness="0" CornerRadius="2">
38+
<Border x:Name="PART_ContentPanelInnerBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="2" Margin="3">
39+
<ContentPresenter x:Name="PART_SelectedContentHost" AllowDrop="True" ContentTemplate="{TemplateBinding SelectedContentTemplate}" Content="{TemplateBinding SelectedContent}" ContentSource="SelectedContent" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
40+
</Border>
41+
</Border>
42+
</syncfusion:Border3D>
43+
</Grid>
44+
</ControlTemplate>
45+
</Setter.Value>
46+
</Setter>
47+
</MultiDataTrigger>
48+
</Style.Triggers>
49+
</Style>
50+
</Window.Resources>
51+
52+
<Grid>
53+
<syncfusion:TabControlExt Grid.Column="0" x:Name="MyTabCtrl"
54+
syncfusion:SkinStorage.VisualStyle="Metro"
55+
AllowDragDrop="False"
56+
EnableLabelEdit="False"
57+
TabScrollStyle="Normal"
58+
ShowTabItemContextMenu="False"
59+
CloseButtonType="Hide"
60+
TabStripPlacement="Top"
61+
HorizontalAlignment="Center"
62+
ShowTabListContextMenu="False"
63+
TabItemSelectedBackground="Red"
64+
TabItemHoverBackground ="ForestGreen"
65+
TabItemHoverForeground ="Black"
66+
TabItemHoverBorderBrush="DarkGreen"
67+
TabItemSelectedBorderBrush="Black"
68+
TabItemSelectedForeground="Yellow"
69+
BorderThickness="0" Width="750" Style="{DynamicResource NewtabControlExtStyle}">
70+
<syncfusion:TabControlExt.Resources>
71+
<Style TargetType="{x:Type syncfusion:HeaderPanel}">
72+
<Setter Property="HorizontalAlignment" Value="Center" />
73+
</Style>
74+
</syncfusion:TabControlExt.Resources>
75+
76+
<syncfusion:TabItemExt Header="Properties" Margin="0" HorizontalAlignment="Center">
77+
<TextBlock Text="Properties tab Description" />
78+
</syncfusion:TabItemExt>
79+
<syncfusion:TabItemExt Header="Solution" Margin="0" HorizontalAlignment="Center">
80+
<TextBlock Text="Solution tab Description" />
81+
</syncfusion:TabItemExt>
82+
<syncfusion:TabItemExt Header="Output" Margin="0" HorizontalAlignment="Center">
83+
<TextBlock Text="Output tab Description" />
84+
</syncfusion:TabItemExt>
85+
86+
</syncfusion:TabControlExt>
87+
</Grid>
88+
</Window>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using System.Windows;
7+
using System.Windows.Controls;
8+
using System.Windows.Data;
9+
using System.Windows.Documents;
10+
using System.Windows.Input;
11+
using System.Windows.Media;
12+
using System.Windows.Media.Imaging;
13+
using System.Windows.Navigation;
14+
using System.Windows.Shapes;
15+
16+
namespace TabControlAlignment
17+
{
18+
/// <summary>
19+
/// Interaction logic for MainWindow.xaml
20+
/// </summary>
21+
public partial class MainWindow : Window
22+
{
23+
public MainWindow()
24+
{
25+
InitializeComponent();
26+
}
27+
}
28+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
using System.Reflection;
2+
using System.Resources;
3+
using System.Runtime.CompilerServices;
4+
using System.Runtime.InteropServices;
5+
using System.Windows;
6+
7+
// General Information about an assembly is controlled through the following
8+
// set of attributes. Change these attribute values to modify the information
9+
// associated with an assembly.
10+
[assembly: AssemblyTitle("TabControlAlignment")]
11+
[assembly: AssemblyDescription("")]
12+
[assembly: AssemblyConfiguration("")]
13+
[assembly: AssemblyCompany("")]
14+
[assembly: AssemblyProduct("TabControlAlignment")]
15+
[assembly: AssemblyCopyright("Copyright © 2020")]
16+
[assembly: AssemblyTrademark("")]
17+
[assembly: AssemblyCulture("")]
18+
19+
// Setting ComVisible to false makes the types in this assembly not visible
20+
// to COM components. If you need to access a type in this assembly from
21+
// COM, set the ComVisible attribute to true on that type.
22+
[assembly: ComVisible(false)]
23+
24+
//In order to begin building localizable applications, set
25+
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
26+
//inside a <PropertyGroup>. For example, if you are using US english
27+
//in your source files, set the <UICulture> to en-US. Then uncomment
28+
//the NeutralResourceLanguage attribute below. Update the "en-US" in
29+
//the line below to match the UICulture setting in the project file.
30+
31+
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32+
33+
34+
[assembly: ThemeInfo(
35+
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
36+
//(used if a resource is not found in the page,
37+
// or application resource dictionaries)
38+
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
39+
//(used if a resource is not found in the page,
40+
// app, or any theme specific resource dictionaries)
41+
)]
42+
43+
44+
// Version information for an assembly consists of the following four values:
45+
//
46+
// Major Version
47+
// Minor Version
48+
// Build Number
49+
// Revision
50+
//
51+
// You can specify all the values or you can default the Build and Revision Numbers
52+
// by using the '*' as shown below:
53+
// [assembly: AssemblyVersion("1.0.*")]
54+
[assembly: AssemblyVersion("1.0.0.0")]
55+
[assembly: AssemblyFileVersion("1.0.0.0")]

TabControlAlignment/Properties/Resources.Designer.cs

Lines changed: 71 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)