tab control

main
syneffort 2 years ago
parent 3568b0bf47
commit 14086b24e3
  1. 6
      PacticeSolution/PacticeSolution.sln
  2. 9
      PacticeSolution/TabControlSample/App.xaml
  3. 17
      PacticeSolution/TabControlSample/App.xaml.cs
  4. 10
      PacticeSolution/TabControlSample/AssemblyInfo.cs
  5. 44
      PacticeSolution/TabControlSample/MainWindow.xaml
  6. 28
      PacticeSolution/TabControlSample/MainWindow.xaml.cs
  7. 10
      PacticeSolution/TabControlSample/TabControlSample.csproj

@ -49,6 +49,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ListBoxBindingSample", "Lis
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeyboardInputSample", "KeyboardInputSample\KeyboardInputSample.csproj", "{B6A7E0D5-A2C7-4083-A060-1672E6FBDC82}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeyboardInputSample", "KeyboardInputSample\KeyboardInputSample.csproj", "{B6A7E0D5-A2C7-4083-A060-1672E6FBDC82}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TabControlSample", "TabControlSample\TabControlSample.csproj", "{7A148D37-36D1-43B5-A133-B02CE5CB743F}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -147,6 +149,10 @@ Global
{B6A7E0D5-A2C7-4083-A060-1672E6FBDC82}.Debug|Any CPU.Build.0 = Debug|Any CPU {B6A7E0D5-A2C7-4083-A060-1672E6FBDC82}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B6A7E0D5-A2C7-4083-A060-1672E6FBDC82}.Release|Any CPU.ActiveCfg = Release|Any CPU {B6A7E0D5-A2C7-4083-A060-1672E6FBDC82}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B6A7E0D5-A2C7-4083-A060-1672E6FBDC82}.Release|Any CPU.Build.0 = Release|Any CPU {B6A7E0D5-A2C7-4083-A060-1672E6FBDC82}.Release|Any CPU.Build.0 = Release|Any CPU
{7A148D37-36D1-43B5-A133-B02CE5CB743F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7A148D37-36D1-43B5-A133-B02CE5CB743F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7A148D37-36D1-43B5-A133-B02CE5CB743F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7A148D37-36D1-43B5-A133-B02CE5CB743F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

@ -0,0 +1,9 @@
<Application x:Class="TabControlSample.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:TabControlSample"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace TabControlSample
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}

@ -0,0 +1,10 @@
using System.Windows;
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]

@ -0,0 +1,44 @@
<Window x:Class="TabControlSample.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:TabControlSample"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="400">
<Grid Margin="10">
<TabControl>
<TabItem>
<TabItem.Header>
<StackPanel Orientation="Horizontal">
<Image Source="https://cdn4.iconfinder.com/data/icons/logos-and-brands/512/216_Microsoft_logo_logos-512.png" Width="10" Margin="0,0,5,0"/>
<TextBlock Text="Item1"/>
</StackPanel>
</TabItem.Header>
<StackPanel>
<Label Content="Item1 #1"/>
<Label Content="Item1 #2"/>
<Label Content="Item1 #3"/>
<Label Content="Item1 #4"/>
</StackPanel>
</TabItem>
<TabItem Header="Item2">
<StackPanel>
<Label Content="Item2 #1"/>
<Label Content="Item2 #2"/>
<Label Content="Item2 #3"/>
<Label Content="Item2 #4"/>
</StackPanel>
</TabItem>
<TabItem Header="Item3">
<StackPanel>
<Label Content="Item3 #1"/>
<Label Content="Item3 #2"/>
<Label Content="Item3 #3"/>
<Label Content="Item3 #4"/>
</StackPanel>
</TabItem>
</TabControl>
</Grid>
</Window>

@ -0,0 +1,28 @@
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.Navigation;
using System.Windows.Shapes;
namespace TabControlSample
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
}
}

@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
</PropertyGroup>
</Project>
Loading…
Cancel
Save