-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathMainWindow.xaml
32 lines (32 loc) · 2.34 KB
/
MainWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<Window x:Class="MouseToJoystick2.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:MouseToJoystick2"
mc:Ignorable="d"
DataContext="{StaticResource MainWindowModel}"
Title="MouseToJoystick" ResizeMode="CanMinimize" SizeToContent="WidthAndHeight">
<StackPanel>
<Grid>
<Label Content="vJoy Device:" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.ColumnSpan="2" Height="26"/>
<TextBox x:Name="vJoyDeviceInput" HorizontalAlignment="Left" IsEnabled="{Binding SettingsEnabled}" Text="{Binding DeviceId}" VerticalAlignment="Top" Width="16" Margin="74,4,0,0" Grid.ColumnSpan="2" Height="20"/>
</Grid>
<StackPanel>
<CheckBox x:Name="invertXCheckbox" Content="Invert X" Height="15" IsChecked="{Binding InvertX}" IsEnabled="{Binding SettingsEnabled}"/>
<CheckBox x:Name="invertYCheckbox" Content="Invert Y" Height="15" IsChecked="{Binding InvertY}" IsEnabled="{Binding SettingsEnabled}"/>
<CheckBox Content="Auto-Center" IsChecked="{Binding AutoCenter}" Height="15" IsEnabled="{Binding SettingsEnabled}"/>
</StackPanel>
<WrapPanel>
<Label Content="Screen Size: "/>
<RadioButton Content="Automatic" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Center" Margin="0,0,5,0" IsChecked="{Binding AutoScreenSize}" GroupName="ScreenSize" IsEnabled="{Binding SettingsEnabled}"/>
<RadioButton Content="Custom" VerticalContentAlignment="Center" GroupName="ScreenSize" IsChecked="{Binding ManualScreenSize}" IsEnabled="{Binding SettingsEnabled}"/>
<Label Content="W:" />
<TextBox Width="32" Height="20" IsEnabled="{Binding ManualScreenSize}" Text="{Binding ScreenWidth}"/>
<Label Content="H:" />
<TextBox Width="32" Height="20" IsEnabled="{Binding ManualScreenSize}" Text="{Binding ScreenHeight}"/>
</WrapPanel>
<ToggleButton Content="Run" Click="ToggleButton_Click" IsChecked="{Binding ShouldRun}" Margin="10"></ToggleButton>
<TextBlock HorizontalAlignment="Right"><Hyperlink FontSize="10" Click="Hyperlink_Click">Open Source Info</Hyperlink></TextBlock>
</StackPanel>
</Window>