I am trying to make an image stretch to fit the screen with preserverd aspect ratio. I thought this code would do the trick:
<Image Name="Viewer" Height="{Binding SystemParameters.PrimaryScreenHeight}" Width="{Binding SystemParameters.PrimaryScreenHeight}" Stretch="Uniform" StretchDirection="Both"/>
Regretably it seems like the image just fits to the width of the screen and crops it at the bottom.
The complete xaml code looks like this:
enter co<Window x:Class="ImageExplorer.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:ImageExplorer"
mc:Ignorable="d"
Title="MainWindow" WindowState="Maximized" Background="Black">
<StackPanel>
<Border BorderBrush="Black" BorderThickness="2">
<Grid Margin="0,0,0,0">
<Button Content="open" Click="OpenImage" HorizontalAlignment="Left" VerticalAlignment="Center" Width="58" Height="30" Margin="1,1,1,1" />
<Button Content="Prev." Click="GetPreviousImage" HorizontalAlignment="Left" VerticalAlignment="Center" Width="58" Height="30" Margin="120,1,1,1"/>
<Button Content="Next" Click="GetNextImage" HorizontalAlignment="Left" VerticalAlignment="Center" Width="58" Height="30" Margin="180,1,1,1" />
<Label Content="Fil:" HorizontalAlignment="Right" VerticalAlignment="Center" Width="120" Height="30" Margin="1,1,300,1"/>
<TextBlock Name="StiViser" HorizontalAlignment="Right" VerticalAlignment="Center" Width="298" Margin="1,1,1,1" TextWrapping="Wrap" Text="TextBlock"/>
</Grid>
</Border>
<Image Name="Viewer" Height="{Binding SystemParameters.PrimaryScreenHeight}" Width="{Binding SystemParameters.PrimaryScreenWidth}" Stretch="Uniform" StretchDirection="Both"/>
</StackPanel>
Use DockPanel instead
<DockPanel LastChildFill="True">
<Border DockPanel.Dock="Top" BorderBrush="Black" BorderThickness="2">
<Grid Margin="0,0,0,0">
<Button Content="open" Click="OpenImage" HorizontalAlignment="Left" VerticalAlignment="Center" Width="58" Height="30" Margin="1,1,1,1" />
<Button Content="Prev." Click="GetPreviousImage" HorizontalAlignment="Left" VerticalAlignment="Center" Width="58" Height="30" Margin="120,1,1,1"/>
<Button Content="Next" Click="GetNextImage" HorizontalAlignment="Left" VerticalAlignment="Center" Width="58" Height="30" Margin="180,1,1,1" />
<Label Content="Fil:" HorizontalAlignment="Right" VerticalAlignment="Center" Width="120" Height="30" Margin="1,1,300,1"/>
<TextBlock Name="StiViser" HorizontalAlignment="Right" VerticalAlignment="Center" Width="298" Margin="1,1,1,1" TextWrapping="Wrap" Text="TextBlock"/>
</Grid>
</Border>
<Image Name="Viewer" Height="{Binding SystemParameters.PrimaryScreenHeight}" Width="{Binding SystemParameters.PrimaryScreenWidth}" Stretch="Fill" StretchDirection="Both"/>
</DockPanel>
Related
I am using canvas within which there are several controls.
I want to allow user a facility to easily drag and drop canvas anywhere within the control.
How can i move canvas with name myCanvas?
Below is the xml code:
<UserControl x:Class="EMap.Windows.MainWindowNew"
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"
mc:Ignorable="d"
xmlns:src="clr-namespace:EMap"
d:DesignHeight="500" d:DesignWidth="1000" Background="#FF3E3E40">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="120*"/>
<ColumnDefinition Width="121*"/>
<ColumnDefinition Width="285*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="49*"/>
<RowDefinition Height="101*"/>
</Grid.RowDefinitions>
<Canvas Name="myCanvas" Height="800" Background="Aqua"
Grid.Row="0" Grid.RowSpan="2" Panel.ZIndex="1" Opacity="0.5" Canvas.Left="0" Canvas.Top="0">
<Label Content="Lattitude" Foreground="Black" Padding="5"/>
<Label Content="Longitude" Foreground="Black" Padding="5" Canvas.Top="25"/>
<Label Content="Camera Name" Foreground="Black" Padding="5" Canvas.Top="50"/>
<Border Canvas.Left="85" Padding="2"
VerticalAlignment="Center"
BorderBrush="Green"
BorderThickness="1">
<TextBox x:Name="Lattitude" Background="Black" TextWrapping="Wrap" Width="119" Foreground="White"/>
</Border>
<Border Canvas.Left="85" Canvas.Top="25" HorizontalAlignment="Center"
VerticalAlignment="Center"
Padding="1"
BorderBrush="Green"
BorderThickness="1">
<TextBox Name="Longitude" Background="Black" TextWrapping="Wrap" Width="119" Foreground="White"/>
</Border>
<Border Canvas.Left="85" Canvas.Top="50" HorizontalAlignment="Center"
VerticalAlignment="Center"
Padding="1"
BorderBrush="Green"
BorderThickness="1">
<TextBox Name="camName" Background="Black" TextWrapping="Wrap" Width="119" Foreground="White"/>
</Border>
<Button Name="PlaceCamera" Content="Place Camera" Foreground="Black"
HorizontalAlignment="Center" VerticalAlignment="Bottom" Background="Transparent"
Canvas.Left="110" Canvas.Top="75" Click="PlaceCamera_Click"/>
<Button Name="RemoveCamera" Content="Remove Camera" Foreground="Black"
HorizontalAlignment="Center" VerticalAlignment="Bottom" Background="Transparent"
Canvas.Left="110" Canvas.Top="100" Click="RemoveCamera_Click"/>
<Button Name="GetAllCamera" Content="Get all Cameras" Foreground="Black"
HorizontalAlignment="Center" VerticalAlignment="Bottom" Background="Transparent"
Canvas.Left="110" Canvas.Top="125" Click="GetAllCamera_Click"/>
</Canvas>
<GroupBox Name="mapgroup" Panel.ZIndex="0" Background="Teal"
Grid.Row="0" Grid.RowSpan="2" Grid.ColumnSpan="3"
VerticalContentAlignment="Stretch"
HorizontalContentAlignment="Stretch">
<src:Map x:Name="MainMap" CanDragMap="False" Zoom="13" MaxZoom="24" MinZoom="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
</GroupBox>
My user control seems fine with 0 errors and 0 warnings
But when I add my user control to the grid row it doesn't show all the buttons from my user control. There isn't errors or even warnings
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:UX="clr-namespace:JBoxSystem.UX" x:Class="JBoxSystem.MainWindow"
Title="MainWindow" Height="700" Width="1100" Background="#333">
<Window.Resources>
<Storyboard x:Key="playingEffect"/>
</Window.Resources>
<Window.Triggers>
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
<BeginStoryboard Storyboard="{StaticResource playingEffect}"/>
</EventTrigger>
</Window.Triggers>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="79*"/>
<ColumnDefinition Width="429*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="250*"/>
<RowDefinition Height="79*"/>
</Grid.RowDefinitions>
<WindowsFormsHost Grid.Column="1"/>
<UX:AlbumSlider Grid.Column="1" Margin="10,0,0,0" Width="Auto" Height="Auto"/>
<UX:MediaPlayerBar Margin="8,12,6,371" Height="Auto" Width="Auto"/>
<UX:BottomBar Width="Auto" Height="Auto" Grid.ColumnSpan="2" Grid.Row="1"/>
</Grid>
<UserControl x:Class="JBoxSystem.UX.BottomBar"
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:JBoxSystem.UX"
mc:Ignorable="d"
d:DesignHeight="250" d:DesignWidth="1020" Background="Transparent">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/JBoxSystem;component/Resources/GlassButton.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid Margin="-15,0,15,0">
<Button Style="{StaticResource GlassButton}" Background="Blue" Margin="248,180,717,18">
<Image Width="47" Height="45" Source="Resources\Images\VolumeUp.png"/>
</Button>
<Button Style="{StaticResource GlassButton}" Background="Blue" Margin="168,180,797,18" Click="Button_Click">
<Image Width="55" Height="45" Source="Resources\Images\VolumeDown.png"/>
</Button>
<Button Style="{StaticResource GlassButton}" Width="45" Height="47" Background="Orange" Margin="323,183,652,20" Click="Button_Click">
<Image Width="55" Height="45" Source="Resources\Images\Mute.png"/>
</Button>
<Button Style="{DynamicResource SquareGlassButton}"
Margin="0,0,890,18"
Name="alphabetSearch"
Height="72"
VerticalAlignment="Bottom"
HorizontalAlignment="Right"
Width="120">
<Image Width="72" Height="72" Source="Resources\Images\alphabet_search.png"/>
</Button>
<Button Style="{DynamicResource SquareGlassButton}"
Margin="0,0,442,-2"
Name="alphabetKeyboardSearch"
Height="72"
VerticalAlignment="Bottom"
HorizontalAlignment="Right"
Width="120">
<Image Width="72" Height="72" Source="Resources\Images\keyboard.png"/>
</Button>
<Button Style="{StaticResource GlassButton}" Width="40" Height="40" Background="Black" Margin="413,160,567,50">
<Image Width="30" Height="30" Source="Resources\images\leftArrow.png" RenderTransformOrigin="0.5,0.5">
<Image.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="-359.529"/>
<TranslateTransform/>
</TransformGroup>
</Image.RenderTransform>
</Image>
</Button>
<Button Style="{StaticResource GlassButton}" Width="40" Height="40" Background="Black" Margin="583,160,397,50">
<Image Width="30" Height="30" Source="Resources\images\RightArrow.png"/>
</Button>
<Button Style="{DynamicResource SquareGlassButton}"
Margin="0,0,442,70"
Name="numberPadSearch"
Height="72"
VerticalAlignment="Bottom"
HorizontalAlignment="Right"
Width="120">
<Image Width="72" Height="72" Source="Resources\Images\numbers.png"/>
</Button>
<Button Style="{DynamicResource SquareGlassButton}"
Margin="0,0,250,10"
Name="top100Search"
Height="72"
VerticalAlignment="Bottom"
HorizontalAlignment="Right"
Width="120">
<Image Width="64" Height="64" Source="Resources\Images\favorite.png"/>
</Button>
<Button Style="{DynamicResource SquareGlassButton}"
Margin="0,0,122,10"
Name="waitingList"
Height="72"
VerticalAlignment="Bottom"
HorizontalAlignment="Right"
Width="120">
<Image Width="64" Height="64" Source="Resources\Images\waitingList.png"/>
</Button>
</Grid>
Use VerticalAlignment="Bottom" HorizontalAlignment="Right" for glas button like this
<Button Style="{StaticResource GlassButton}" Background="Blue" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="248,180,717,18">
<Image Width="47" Height="45" Source="Resources\Images\VolumeUp.png"/>
</Button>
<Button Style="{StaticResource GlassButton}" Background="Blue" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="168,180,797,18" Click="Button_Click">
<Image Width="55" Height="45" Source="Resources\Images\VolumeDown.png"/>
</Button>
<Button Style="{StaticResource GlassButton}" Width="45" Height="47" Background="Orange" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="323,183,652,20" Click="Button_Click">
<Image Width="55" Height="45" Source="Resources\Images\Mute.png"/>
</Button>
I was wondering how to set a camera resolution in 16;9 aspect ratio in windows universal app, I have tried different codes but none of them are working also I am losing a bit of frame rate when I used some of the codes below i don't know how to set a camera resolution to 16;9 that is a problem is there any function inside VideoeEcodingProporties that will help me to accomplish this.
XAML UWP CODE;
<Page
x:Class="whatchado_recorder.Video.Capture"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:whatchado_recorder"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
SizeChanged="Page_SizeChanged">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<StackPanel x:Name="CaptureStack" Visibility="Collapsed" Margin="0,12,0,0" HorizontalAlignment="Stretch" MaxWidth="720">
<ProgressBar x:Name="RecordProgress" Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Center" Height="6" Minimum="0" Maximum="90"/>
<TextBlock x:Name="CameraErrorTextBlock" x:Uid="NoCameraFound" Margin="0,120,0,24" HorizontalAlignment="Center" Text="No camera found :(" VerticalAlignment="Center" FontSize="24" Visibility="Collapsed"/>
<Grid x:Name="CaptureGrid" Margin="0,12,0,0">
<CaptureElement x:Name="CaptureElement" HorizontalAlignment="Stretch" VerticalAlignment="Top" Height="360" Tapped="captureElement_Tapped"/>
<Border Background="Black" Padding="6" Opacity="0.5" HorizontalAlignment="Center" VerticalAlignment="Top">
<TextBlock Foreground="White" FontSize="12">
<Run x:Uid="MaxTime" Text="Max. Time: "/>
<Run Text="{Binding Path=Args.SelectedQuestionOnRecordStart.MaxVideoLength, Converter={StaticResource DoubleToStringConverter}}"/>
</TextBlock>
</Border>
<local:MouseOver x:Name="BackgroundCircle" HorizontalAlignment="Center" VerticalAlignment="Center">
<local:MouseOver.NormalState>
<Ellipse Fill="Black" Opacity="0.25" HorizontalAlignment="Center" VerticalAlignment="Center" Width="192" Height="192" Tapped="captureElement_Tapped"/>
</local:MouseOver.NormalState>
<local:MouseOver.MouseOverState>
<Ellipse Fill="Black" Opacity="0.5" HorizontalAlignment="Center" VerticalAlignment="Center" Width="192" Height="192" Tapped="captureElement_Tapped"/>
</local:MouseOver.MouseOverState>
</local:MouseOver>
<Ellipse x:Name="RecordCircle" Fill="Red" HorizontalAlignment="Center" VerticalAlignment="Center" Width="36" Height="36" Tapped="captureElement_Tapped"/>
<local:MouseOver x:Name="BackgroundStopCircle" Visibility="Collapsed" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,0,0,24">
<local:MouseOver.NormalState>
<Grid HorizontalAlignment="Center" VerticalAlignment="Center" Width="64" Height="64">
<Ellipse Fill="Black" Opacity="0.25" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Tapped="captureElement_Tapped"/>
<Rectangle Fill="Red" HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="16" Tapped="captureElement_Tapped"/>
</Grid>
</local:MouseOver.NormalState>
<local:MouseOver.MouseOverState>
<Grid HorizontalAlignment="Center" VerticalAlignment="Center" Width="64" Height="64">
<Ellipse Fill="Black" Opacity="0.5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Tapped="captureElement_Tapped"/>
<Rectangle Fill="Red" HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="16" Tapped="captureElement_Tapped"/>
</Grid>
</local:MouseOver.MouseOverState>
</local:MouseOver>
<TextBlock x:Name="CountdownText" Visibility="Collapsed" Foreground="White" FontSize="72" Margin="0, -48, 0, 0" Text="3" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBlock x:Name="ExplanationText" x:Uid="LookIntoCamera" Visibility="Collapsed" Foreground="White" FontSize="12" Margin="0, 48, 0, 0" Text="Look into the camera" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Grid>
<Button x:Name="CancelButton" x:Uid="Cancel" Content="Cancel" Style="{StaticResource NormalButtonStyle}" Margin="0,12,0,0" Padding="24,0,24,0" HorizontalAlignment="Right" Click="cancelButton_Click"/>
</StackPanel>
</Grid>
</Page>
UWP CS.CODE;
var maxPreviewResolution = mc.VideoDeviceController.GetAvailableMediaStreamProperties(MediaStreamType.VideoPreview).Aggregate((i1, i2) => (i1 as VideoEncodingProperties).Height > (i2 as VideoEncodingProperties).Height ? i1 : i2);
await mc.VideoDeviceController.SetMediaStreamPropertiesAsync(MediaStreamType.VideoPreview, maxPreviewResolution);
`
You could take a look at the camera resolution sample
See:
IEnumerable<StreamResolution> allPreviewProperties = _previewer.MediaCapture.VideoDeviceController.GetAvailableMediaStreamProperties(MediaStreamType.VideoPreview).Select(x => new StreamResolution(x));
Once you have the mediaStream properties you can look for where
width/16 == height/9
to find all resolutions that match your ratio
I'm working on wpf application , and i want to use the shape of an exsiting image . i made the background of the windows transparent and i added the image , and some buttons but when i excute the application nothing apears .
here is the code
<Controls:MetroWindow x:Class="Selen.Wpf.DemoApplication.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
xmlns:System="clr-namespace:System;assembly=mscorlib" Title="A propos "
Height="300" Width="450" ResizeMode="NoResize" WindowStartupLocation="CenterScreen" TitleForeground="#999988" Background="Transparent"
WindowStyle="None" ShowMaxRestoreButton="False" SizeToContent="WidthAndHeight" AllowsTransparency="True" >
<Grid >
<Border CornerRadius="20,20,20,20" Background="Cornsilk"/>
<Image Height="300" Width="450" Name="test" Source="test1.png" Visibility="Visible"
Stretch="Fill" VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
<Button x:Name="projet" Width="40" Background="Transparent" Visibility="Visible" Margin="64,0,346,260" Click="projet_Click" Cursor="Hand" Height="40" VerticalAlignment="Bottom" >
<Image Width="40" Height="40" Source="pro.png"></Image>
</Button>
<Button x:Name="equipe" Background="Transparent" Width="40" Visibility="Visible" Margin="105,0,305,260" Click="equipe_Click" Cursor="Hand" >
<Image Source="equ.png" Width="40" Height="40" ></Image>
</Button>
<Button x:Name="outils" Width="40" Background="Transparent" Margin="146,0,264,260" Visibility="Visible" Click="outils_Click" Cursor="Hand" Height="40" VerticalAlignment="Bottom" >
<Image Source="outi.png" Width="40" Height="40" ></Image>
</Button>
<TextBlock x:Name="titr" Height="30" Width="350" Margin="10,67,90,203" FontSize="16" TextDecorations="Underline" Foreground="White" Text="Modélisation des surfaces topographique :" />
<TextBlock x:Name="txt" Height="180" Width="300" Margin="10,102,140,18" Text="le text sera met ici" Foreground="White" />
<Image x:Name="image" Height="100" Width="100" Margin="328,130,22,70" />
</Grid>
how can i solve that problem ?
ps : i did already add the image to the project .
You have to use Source="/ApplicationName;component/Images/imagename.png" .
Under the brush catagory in your pages properties Select the background (Has an image icon)
Then set the image source to your picture. it should be in the drop down list
Change the build action of the images to 'Resource'. Also your images path seems to be wrong.
Your Project Setup should like this,
and XAML is
<Grid >
<Border CornerRadius="20,20,20,20" Background="Cornsilk"/>
<Image Height="300" Width="450" Name="test" Source="Images/test1.png" Visibility="Visible"
Stretch="Fill" VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
<Button x:Name="projet" Width="40" Background="Transparent" Visibility="Visible" Margin="64,0,346,260" Click="projet_Click" Cursor="Hand" Height="40" VerticalAlignment="Bottom" >
<Image Width="40" Height="40" Source="Images/equ.png"></Image>
</Button>
<Button x:Name="equipe" Background="Transparent" Width="40" Visibility="Visible" Margin="105,0,305,260" Click="equipe_Click" Cursor="Hand" >
<Image Source="Images/outi.png" Width="40" Height="40" ></Image>
</Button>
<Button x:Name="outils" Width="40" Background="Transparent" Margin="146,0,264,260" Visibility="Visible" Click="outils_Click" Cursor="Hand" Height="40" VerticalAlignment="Bottom" >
<Image Source="Images/pro.png" Width="40" Height="40" ></Image>
</Button>
<TextBlock x:Name="titr" Height="30" Width="350" Margin="10,67,90,203" FontSize="16" TextDecorations="Underline" Foreground="White" Text="Modélisation des surfaces topographique :" />
<TextBlock x:Name="txt" Height="180" Width="300" Margin="10,102,140,18" Text="le text sera met ici" Foreground="White" />
<Image x:Name="image" Height="100" Width="100" Margin="328,130,22,70" />
</Grid>
</Grid>
How could we arrange the controls on a WPF window so that it would automatically align the controls while switching between view modes occur ie between landscape and portrait mode.
<Window x:Class="Custom_Track_Reports.LoginWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="LoginWindow" >
<Viewbox Stretch="Fill">
<Grid Background="#FF58B0DF" Height="401">
<Rectangle Fill="#FFF0F3F4" Height="173" Margin="45,197,58,0" Stroke="Black" VerticalAlignment="Top" AllowDrop="True" />
<Image Height="125" Margin="340,10,330,0" VerticalAlignment="Top" Source="Images/logo_lrg.png"/>
<Label Content="Custom Track Reports" HorizontalAlignment="Left" Margin="287,147,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.607,1.112" Width="268" Height="47" FontFamily="Arial" FontSize="26" Foreground="White"/>
<TextBox Margin="128,0,0,110" TextWrapping="Wrap" VerticalAlignment="Bottom" Height="25" BorderThickness="1" FontFamily="Arial" FontSize="21" Text="" Name="userTextBox" FontStretch="Expanded" Opacity="1" HorizontalAlignment="Left" Width="546" AcceptsReturn="False" KeyDown="userTextBox_KeyDown" />
<Button x:Name="enterButton" Content="Enter" HorizontalAlignment="Right" Margin="0,311,166,0" VerticalAlignment="Top" Width="110" Height="26" FontSize="14" Style="{DynamicResource button}" Click="enterButton_Click"/>
<Label Content="User ID" FontSize="20" FontWeight="Bold" Height="40" HorizontalAlignment="Left" Margin="122,215,0,0" Name="label1" VerticalAlignment="Top" Width="105" />
</Grid>
</Viewbox>