You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
115 lines
6.3 KiB
115 lines
6.3 KiB
<UserControl x:Class="WhackerLinkConsoleV2.Controls.ChannelBox"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
Width="220" Height="100" Background="#FF0B004B">
|
|
<!-- Border wraps the entire Grid -->
|
|
<Border BorderBrush="Gray" BorderThickness="1,1,1,1" CornerRadius="0">
|
|
<Grid Margin="5">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="41"/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition Width="30"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="2*"/>
|
|
<RowDefinition Height="51*"/>
|
|
<RowDefinition Height="32.25"/>
|
|
<RowDefinition Height="7.75"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Left Side PTT Button -->
|
|
|
|
<!-- Main Info Section -->
|
|
<Rectangle Grid.ColumnSpan="2" HorizontalAlignment="Left" Height="40" Margin="1,0,0,0"
|
|
Grid.RowSpan="2" Grid.Row="2" VerticalAlignment="Top"
|
|
Width="116" StrokeThickness="0"
|
|
RadiusX="2" RadiusY="2">
|
|
<Rectangle.Fill>
|
|
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
|
|
<GradientStop Color="#FFF0F0F0" Offset="0.485"/>
|
|
<GradientStop Color="Gainsboro" Offset="0.517"/>
|
|
</LinearGradientBrush>
|
|
</Rectangle.Fill>
|
|
</Rectangle>
|
|
|
|
<!-- Main Info Section -->
|
|
<StackPanel Grid.Column="1" HorizontalAlignment="Left" Width="119" Margin="48,0,0,1" Grid.RowSpan="2" Grid.ColumnSpan="2">
|
|
<TextBlock Text="{Binding ChannelName}" FontWeight="Bold" Foreground="White" FontSize="12"/>
|
|
<TextBlock Text="{Binding LastSrcId}" Foreground="Gold" FontSize="10"/>
|
|
<TextBlock Text="{Binding SystemName}" Foreground="Gold" FontSize="10"/>
|
|
</StackPanel>
|
|
|
|
<!-- Volume Slider -->
|
|
<Slider Minimum="0" Maximum="4" Value="{Binding Volume, Mode=TwoWay}"
|
|
Height="21" VerticalAlignment="Top" x:Name="VolumeSlider"
|
|
ValueChanged="VolumeSlider_ValueChanged" Margin="11,10,65,0"
|
|
Grid.ColumnSpan="2" Grid.Row="2">
|
|
<Slider.Style>
|
|
<Style TargetType="Slider">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Slider">
|
|
<Grid>
|
|
<!-- Background Track -->
|
|
<Rectangle Name="PART_TrackBackground" Height="4" Fill="Gray"
|
|
VerticalAlignment="Center" Margin="4"/>
|
|
|
|
<!-- Track with Functional Movement -->
|
|
<Track Name="PART_Track" VerticalAlignment="Center">
|
|
<Track.DecreaseRepeatButton>
|
|
<!-- Make the left-side button invisible -->
|
|
<RepeatButton Width="0" Background="Transparent" BorderThickness="0"/>
|
|
</Track.DecreaseRepeatButton>
|
|
<Track.IncreaseRepeatButton>
|
|
<!-- Make the right-side button invisible -->
|
|
<RepeatButton Width="0" Background="Transparent" BorderThickness="0"/>
|
|
</Track.IncreaseRepeatButton>
|
|
<Track.Thumb>
|
|
<Thumb Name="PART_Thumb" Width="10" Height="20" Background="DarkGray"/>
|
|
</Track.Thumb>
|
|
</Track>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</Slider.Style>
|
|
</Slider>
|
|
|
|
|
|
|
|
<!-- Bottom Buttons -->
|
|
<StackPanel Grid.Column="1" Grid.Row="2" Orientation="Horizontal" Margin="81,0,-2,0" Grid.RowSpan="2" Grid.ColumnSpan="2">
|
|
<Button Width="40" Height="40" x:Name="PageSelectButton" Click="PageSelectButton_Click" BorderThickness="0,0,0,0">
|
|
<Button.Resources>
|
|
<Style TargetType="{x:Type Border}">
|
|
<Setter Property="CornerRadius" Value="2"/>
|
|
</Style>
|
|
</Button.Resources>
|
|
|
|
<Image Source="pack://application:,,,/WhackerLinkConsoleV2;component/Assets/pageselect.png" Width="39" Height="39" Margin="1.5,2,0,0"/>
|
|
</Button>
|
|
<Button Width="40" Height="40" x:Name="ChannelMarkerBtn" Click="ChannelMarkerBtn_Click" BorderThickness="0,0,0,0" Margin="5,0,0,0">
|
|
<Button.Resources>
|
|
<Style TargetType="{x:Type Border}">
|
|
<Setter Property="CornerRadius" Value="2"/>
|
|
</Style>
|
|
</Button.Resources>
|
|
|
|
<Image Source="pack://application:,,,/WhackerLinkConsoleV2;component/Assets/channelmarker.png" Width="36" Height="40"/>
|
|
</Button>
|
|
</StackPanel>
|
|
<Button x:Name="PttButton" Click="PTTButton_Click" HorizontalAlignment="Left" Width="42" Margin="41,1,0,4" Grid.ColumnSpan="2" BorderThickness="0,0,0,0" BorderBrush="#FFC1C1C1" UseLayoutRounding="False" Grid.RowSpan="2" Background="#FFEEA400">
|
|
<Button.Resources>
|
|
<Style TargetType="{x:Type Border}">
|
|
<Setter Property="CornerRadius" Value="2"/>
|
|
</Style>
|
|
</Button.Resources>
|
|
|
|
<Image Source="/Assets/instantptt.png" Width="39" Height="40" Stretch="Fill" Margin="0,0,0,1"/>
|
|
</Button>
|
|
</Grid>
|
|
</Border>
|
|
</UserControl>
|