0

I'm trying to dock my application (a taskbar-like window) to the top of a screen. I currently have the correct position, but my problem is having programs be covered by the application. I need to have the application visible at all times and have the desktop icons & other open applications treat the bottom of the application the same as the edge of the screen (i.e. desktop icons will be moved out from under the application, maximizing a program will only go as far as the bottom of the application). I can't find any solutions to this. I found a question similar to mine, but it was never answered.

<Window x:Name="calBar" x:Class="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:MAN_8_Calibration_Indicator"
        mc:Ignorable="d"
        Topmost="True"
        SnapsToDevicePixels="True"
        WindowStyle="None"
        Top="0" Left="0"
        
        Title="MAN-8 Calibration Indicator" ResizeMode="NoResize" Background="#FF28FF00" Height="Auto" HorizontalAlignment="Left" VerticalAlignment="Top" Width="Auto" SizeToContent="WidthAndHeight" WindowState="Normal" ShowInTaskbar="False">
    <Grid>
        <Label x:Name="calIndicator" Grid.Column="1" Content="MAN-8 IS CURRENTLY CALIBRATED TO SPURIOUS" FontFamily="Arial Rounded MT Bold" FontWeight="Normal" FontSize="22" HorizontalAlignment="Center" VerticalAlignment="Top" Height="35" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Width="560"/>
        <RadioButton x:Name="changeCalibration" Content="Switch to RxBNP" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="2" Focusable="False" ToolTip="Select to change calibration indicator" FontFamily="Arial Rounded MT Bold"/>

            <Grid.ColumnDefinitions>
            <ColumnDefinition Width="680"/>
            <ColumnDefinition Width="560"/>
            <ColumnDefinition Width="680"/>
        </Grid.ColumnDefinitions>
    </Grid>
</Window>
Class MainWindow
    Private Sub calBar_Deactivated(sender As Object, e As EventArgs) Handles calBar.Deactivated
        Topmost = True

    End Sub

    Private Sub changeCalibration_Checked(sender As Object, e As RoutedEventArgs) Handles changeCalibration.Checked
        If changeCalibration.Content = "Switch to RxBNP" Then
            changeCalibration.IsChecked = False
            changeCalibration.Content = "Switch to Spurious"
            calIndicator.Content = "MAN-8 IS CURRENTLY CALIBRATED TO RXBNP"

        ElseIf changeCalibration.Content = "Switch to Spurious" Then
            changeCalibration.IsChecked = False
            changeCalibration.Content = "Switch to RxBNP"
            calIndicator.Content = "MAN-8 IS CURRENTLY CALIBRATED TO SPURIOUS"
        End If
    End Sub
End Class

0 Answers0