Something went wrong. Try again.
Modular scanner/radio client and multi-broadcast server. uniscan.dexrn.me
Something went wrong. Try again.
3.0 kB · 42 lines
at main
12345678910111213141516171819202122232425262728293031323334353637383940414243<UserControl xmlns="https://github.com/avaloniaui" 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:asyncImageLoader="clr-namespace:AsyncImageLoader;assembly=AsyncImageLoader.Avalonia" xmlns:remote="clr-namespace:UniScan.Client.App.Views.Remote" xmlns:connection="clr-namespace:UniScan.Client.Core.Remote.Connection;assembly=UniScan.Client.Core" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:Class="UniScan.Client.App.Views.Remote.SidebarRemoteItemControl" x:DataType="remote:RemoteViewModel"> <Grid ColumnDefinitions="*, Auto" HorizontalAlignment="Stretch"> <Button Grid.Column="0" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" Command="{Binding SwitchToPageCommand}" ToolTip.Tip="{Binding Remote.DisplayName.Value}"> <StackPanel Orientation="Horizontal" Spacing="10"> <!-- todo see if we can nuke sizing stuffs once we start styling --> <Image VerticalAlignment="Center" asyncImageLoader:ImageLoader.Source="{Binding Remote.RemoteInfo.Value.Branding.LogoUrl}" Width="24" Height="24" IsVisible="{Binding Remote.RemoteInfo.Value.Branding.LogoUrl, Converter={x:Static ObjectConverters.IsNotNull}, FallbackValue=False, TargetNullValue=False}" /> <TextBlock VerticalAlignment="Center" FontSize="16" Text="{Binding Remote.DisplayName.Value}" /> </StackPanel> </Button> <!-- padding is kind of a hack --> <Border Grid.Column="1" Padding="5 0 0 0"> <Border.IsVisible> <MultiBinding Converter="{x:Static BoolConverters.And}"> <Binding Path="Remote.ConnectionStatus.Value.State" Converter="{x:Static ObjectConverters.Equal}" ConverterParameter="{x:Static connection:ConnectionState.Connected}" /> <Binding Path="IsPaneOpen" Mode="TwoWay" RelativeSource="{RelativeSource AncestorType={x:Type SplitView}}" /> </MultiBinding> </Border.IsVisible> <Button AutomationProperties.Name="Disconnect" ToolTip.Tip="Disconnect/Log out" Command="{Binding DisconnectCommand}" VerticalAlignment="Stretch" Width="{Binding $self.Bounds.Height}"> <TextBlock FontFamily="{StaticResource MaterialSymbolsRounded}" Text="logout" FontSize="24" Width="24" Height="24" Margin="0 0 0 0" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center" /> </Button> </Border> </Grid></UserControl>