Something went wrong. Try again.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103<Window x:Class="Cabal4.WindowMain" 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:Cabal4" mc:Ignorable="d" Height="450" Width="800" ResizeMode="CanMinimize" Icon="IconPica.ico" Background="{DynamicResource BackGround}" Title="Cabal Box"> <Window.Resources> <SolidColorBrush x:Key="BackGround" Color="#FF1F757E" /> <SolidColorBrush x:Key="BackGround2" Color="#FF1B8693" /> <!--================================================================= GroupBox Template Example==================================================================--> <BorderGapMaskConverter x:Key="BorderGapMaskConverter" /> <Style x:Key="{x:Type GroupBox}" TargetType="{x:Type GroupBox}"> <Setter Property="BorderBrush" Value="{x:Null}" /> <Setter Property="Foreground" Value="White" /> <Setter Property="BorderThickness" Value="1" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type GroupBox}"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="4" /> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> <ColumnDefinition Width="4" /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="*" /> <RowDefinition Height="4" /> </Grid.RowDefinitions> <Border CornerRadius="4" Grid.Row="1" Grid.RowSpan="3" Grid.Column="0" Grid.ColumnSpan="4" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="Transparent" Background="{TemplateBinding Background}" /> <!-- ContentPresenter for the header --> <Border x:Name="Header" Padding="6,0,6,0" Grid.Row="0" Grid.RowSpan="2" Grid.Column="1"> <ContentPresenter ContentSource="Header" RecognizesAccessKey="True" /> </Border> <!-- Primary content for GroupBox --> <ContentPresenter Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Margin="{TemplateBinding Padding}" /> <Border CornerRadius="0" Grid.Row="1" Grid.RowSpan="3" Grid.ColumnSpan="4" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}"> <Border.OpacityMask> <MultiBinding Converter= "{StaticResource BorderGapMaskConverter}" ConverterParameter="6"> <Binding ElementName="Header" Path="ActualWidth" /> <Binding RelativeSource="{RelativeSource Self}" Path="ActualWidth" /> <Binding RelativeSource="{RelativeSource Self}" Path="ActualHeight" /> </MultiBinding> </Border.OpacityMask> </Border> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> <SolidColorBrush x:Key="Grey1" Color="#FFBFBFBF" /> </Window.Resources> <Window.BorderBrush> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="Black" Offset="0" /> <GradientStop Color="#FFF71E1E" Offset="1" /> </LinearGradientBrush> </Window.BorderBrush> <Grid HorizontalAlignment="Left" Height="421" VerticalAlignment="Top" Width="790"> <Grid.ColumnDefinitions> <ColumnDefinition Width="45*" /> <ColumnDefinition Width="34*" /> </Grid.ColumnDefinitions> <GroupBox Header="Teleport" HorizontalAlignment="Left" Height="340" Margin="10,10,0,0" VerticalAlignment="Top" Width="310" UseLayoutRounding="False" BorderThickness="2" Style="{DynamicResource {x:Type GroupBox}}" BorderBrush="{DynamicResource Grey1}" Foreground="White"> <DockPanel HorizontalAlignment="Left" Height="100" LastChildFill="False" Margin="155,85,0,0" VerticalAlignment="Top" Width="100" /> </GroupBox> <ListBox Height="94" Margin="70,80,92,247" VerticalAlignment="Center" Background="{DynamicResource BackGround2}" BorderBrush="{DynamicResource Grey1}" Foreground="White" Width="178" Grid.Column="1" /> </Grid></Window>