mirror of
https://github.com/openziti/desktop-edge-win.git
synced 2026-09-21 10:23:45 +00:00
84 lines
4.3 KiB
XML
84 lines
4.3 KiB
XML
<!--
|
|
Copyright NetFoundry Inc.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
https://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
<UserControl x:Class="ZitiDesktopEdge.AddIdentityUrl"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:ZitiDesktopEdge"
|
|
mc:Ignorable="d"
|
|
MaxWidth="400"
|
|
d:Width="400"
|
|
>
|
|
<UserControl.Resources>
|
|
<Style x:Key="InvalidUrl" TargetType="TextBox">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="TextBox">
|
|
<Border BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
Background="{TemplateBinding Background}">
|
|
<ScrollViewer x:Name="PART_ContentHost" Focusable="false" />
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="Background" Value="{StaticResource InvalidUrlBackgroundBrush}" />
|
|
<Setter Property="BorderBrush" Value="{StaticResource InvalidUrlBorderBrush}" />
|
|
<Setter Property="BorderThickness" Value="4" />
|
|
<Setter Property="Foreground" Value="{StaticResource InvalidUrlBorderBrush}" />
|
|
</Style>
|
|
<Style x:Key="ValidUrl" TargetType="TextBox">
|
|
<Setter Property="Background" Value="White" />
|
|
<Setter Property="BorderBrush" Value="Transparent" />
|
|
<Setter Property="BorderThickness" Value="4" />
|
|
<Setter Property="Foreground" Value="Black" />
|
|
</Style>
|
|
</UserControl.Resources>
|
|
<Grid Margin="0" Height="Auto" VerticalAlignment="Center" Loaded="Grid_Loaded">
|
|
<Border Background="{StaticResource DarkBackgroundBrush}"
|
|
BorderBrush="Gray"
|
|
BorderThickness="2"
|
|
CornerRadius="10"
|
|
Padding="10">
|
|
</Border>
|
|
<StackPanel x:Name="UrlPanel" Margin="5,10,5,10">
|
|
<Label Content="Controller URL" Foreground="White" FontSize="16" HorizontalAlignment="Center" FontWeight="Bold"/>
|
|
<Label Content="Enter the controller URL" Foreground="White" Opacity="0.7" FontSize="12" HorizontalAlignment="Center"/>
|
|
<TextBox x:Name="ControllerURL"
|
|
Text="{Binding UrlPlaceholder, Mode=OneTime}"
|
|
Focusable="True"
|
|
FontSize="14"
|
|
TextAlignment="Center"
|
|
Margin="0,0,0,15"
|
|
TextChanged="ControllerURL_TextChanged"
|
|
TextWrapping="NoWrap"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Top"
|
|
HorizontalScrollBarVisibility="Hidden"
|
|
MaxWidth="340"
|
|
Width="Auto" KeyUp="HandleEnterKey"
|
|
/>
|
|
<!-- A place for a name, might be needed? -->
|
|
<!--Label Content="Identity Alias" Foreground="White" Opacity="0.7" FontSize="12" HorizontalAlignment="Center"/>
|
|
<TextBox x:Name="IdentityName" FontSize="14" TextAlignment="Center" BorderThickness="0" Margin="0,0,0,15" /-->
|
|
<local:StyledButton x:Name="JoinNetworkBtn" OnClick="JoinNetworkUrl" Label="Join Network" />
|
|
|
|
</StackPanel>
|
|
<Image x:Name="CloseWhite" Source="/Assets/Images/close.png" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,20,20,0" Width="15" Height="15" Cursor="Hand" MouseUp="ExecuteClose"></Image>
|
|
</Grid>
|
|
</UserControl>
|