|
| 1 | +<UserControl x:Class="ExpressionAvatarChanger.TriggerInputItem" |
| 2 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 3 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 4 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 5 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 6 | + xmlns:local="clr-namespace:ExpressionAvatarChanger" |
| 7 | + xmlns:osc="clr-namespace:BuildSoft.VRChat.Osc;assembly=vrcosclib" |
| 8 | + xmlns:sys="clr-namespace:System;assembly=System.Runtime" |
| 9 | + mc:Ignorable="d" d:DesignWidth="800"> |
| 10 | + <UserControl.Resources> |
| 11 | + <ResourceDictionary> |
| 12 | + </ResourceDictionary> |
| 13 | + </UserControl.Resources> |
| 14 | + <Grid> |
| 15 | + <Grid.ColumnDefinitions> |
| 16 | + <ColumnDefinition Width="50"/> |
| 17 | + <ColumnDefinition Width="2*" MaxWidth="300"/> |
| 18 | + <ColumnDefinition/> |
| 19 | + <ColumnDefinition/> |
| 20 | + <ColumnDefinition Width="80"/> |
| 21 | + <ColumnDefinition Width="100"/> |
| 22 | + </Grid.ColumnDefinitions> |
| 23 | + <CheckBox Grid.Column="0" Margin="10,2" IsChecked="{Binding IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:TriggerInputItem}}}" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
| 24 | + <ComboBox x:Name="AvatarIdComboBox" Grid.Column="1" Margin="10,2" |
| 25 | + Text="{Binding AvatarId, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:TriggerInputItem}}}" |
| 26 | + IsEditable="True" |
| 27 | + ItemsSource="{Binding AvatarIdList}" |
| 28 | + SelectionChanged="AvatarIdComboBox_SelectionChanged" |
| 29 | + TextBoxBase.TextChanged="InactiveOnTextChanged"/> |
| 30 | + <ComboBox x:Name="AvatarNameComboBox" Grid.Column="2" Margin="10,2" |
| 31 | + Text="{Binding AvatarName, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:TriggerInputItem}}}" |
| 32 | + IsEditable="True" |
| 33 | + ItemsSource="{Binding AvatarNameList}" |
| 34 | + SelectionChanged="AvatarNameComboBox_SelectionChanged" |
| 35 | + TextBoxBase.TextChanged="InactiveOnTextChanged"/> |
| 36 | + <ComboBox x:Name="ParameterNameComboBox" Grid.Column="3" Margin="10,2" |
| 37 | + Text="{Binding ParameterName, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:TriggerInputItem}}}" |
| 38 | + IsEditable="True" |
| 39 | + ItemsSource="{Binding ParameterList}" |
| 40 | + SelectionChanged="ParameterNameComboBox_SelectionChanged" |
| 41 | + TextBoxBase.TextChanged="InactiveOnTextChanged"/> |
| 42 | + <ComboBox x:Name="ThresholdTypeComboBox" Grid.Column="4" Margin="10,2" |
| 43 | + Text="{Binding ThresholdType, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:TriggerInputItem}}}" |
| 44 | + IsEditable="False" |
| 45 | + TextBoxBase.TextChanged="InactiveOnTextChanged"> |
| 46 | + <ComboBoxItem Content="{x:Static osc:OscType.Bool}"></ComboBoxItem> |
| 47 | + <ComboBoxItem Content="{x:Static osc:OscType.Int}"></ComboBoxItem> |
| 48 | + <ComboBoxItem Content="{x:Static osc:OscType.Float}"></ComboBoxItem> |
| 49 | + </ComboBox> |
| 50 | + <ComboBox x:Name="ThresholdComboBox" Grid.Column="5" Margin="10,2" Text="{Binding Threshold, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:TriggerInputItem}}}" TextBoxBase.TextChanged="InactiveOnTextChanged"> |
| 51 | + <Control.Style> |
| 52 | + <Style TargetType="ComboBox"> |
| 53 | + <Setter Property="IsEditable" Value="True"/> |
| 54 | + <Style.Triggers> |
| 55 | + <DataTrigger Binding="{Binding ThresholdType,RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:TriggerInputItem}}}" Value="{x:Static osc:OscType.Bool}"> |
| 56 | + <Setter Property="ItemsSource"> |
| 57 | + <Setter.Value> |
| 58 | + <x:Array Type="sys:String"> |
| 59 | + <sys:String>True</sys:String> |
| 60 | + <sys:String>False</sys:String> |
| 61 | + </x:Array> |
| 62 | + </Setter.Value> |
| 63 | + </Setter> |
| 64 | + <Setter Property="IsEditable" Value="False"/> |
| 65 | + </DataTrigger> |
| 66 | + </Style.Triggers> |
| 67 | + </Style> |
| 68 | + </Control.Style> |
| 69 | + </ComboBox> |
| 70 | + </Grid> |
| 71 | +</UserControl> |
0 commit comments