-
Notifications
You must be signed in to change notification settings - Fork 15
/
AddOrChangeAssetPage.xaml
98 lines (92 loc) · 7.03 KB
/
AddOrChangeAssetPage.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<Page
x:Class="ScreenlyManager.AddOrChangeAssetPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:ScreenlyManager"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<ScrollViewer Grid.Column="0" VerticalScrollBarVisibility="Auto">
<StackPanel MaxWidth="960" HorizontalAlignment="Left" Margin="0,0,0,20">
<TextBlock x:Uid="AddAssetTitle" x:Name="TextBlockTitle" Text="" FontSize="30" HorizontalAlignment="Left" Margin="20, 12"/>
<TextBlock x:Uid="AddAssetName" Text="" HorizontalAlignment="Left" Margin="20, 2"/>
<TextBox x:Uid="AddAssetNameTextBox" x:Name="TextBoxName" Margin="20,2" MaxLength="30" PlaceholderText="" />
<TextBlock x:Uid="AddAssetUrl" Text="" HorizontalAlignment="Left" Margin="20, 20, 20, 2"/>
<TextBox x:Uid="AddAssetUrlTextBox" x:Name="TextBoxUrl" Margin="20,2" PlaceholderText="" />
<Button x:Uid="AddAssetUrlFileButton" Grid.Column="1" x:Name="ButtonFile" Content="" Width="150" HorizontalAlignment="Left" Margin="20, 2" Click="ButtonFile_Click"/>
<TextBlock x:Uid="AddAssetType" Text="" HorizontalAlignment="Left" Margin="20, 20, 20, 2"/>
<ComboBox x:Name="ComboBoxAssetType" HorizontalAlignment="Left" Margin="20, 2" HorizontalContentAlignment="Stretch" ItemsSource="{x:Bind MimeTypes}" DisplayMemberPath="Item2" SelectedValuePath="Item1" Loaded="ComboBoxAssetType_Loaded"/>
<TextBlock x:Uid="AddAssetStartDate" Text="" HorizontalAlignment="Left" Margin="20, 20, 20, 2"/>
<RelativePanel Margin="20, 2">
<DatePicker x:Name="DatePickerStart" DateChanged="DatePickerStart_DateChanged" />
<TimePicker x:Name="TimePickerStart" RelativePanel.RightOf="DatePickerStart" Margin="20,0,0,0" />
</RelativePanel>
<TextBlock x:Uid="AddAssetEndDate" Text="" HorizontalAlignment="Left" Margin="20, 20, 20, 2"/>
<RelativePanel Margin="20, 2">
<DatePicker x:Name="DatePickerEnd" />
<TimePicker x:Name="TimePickerEnd" RelativePanel.RightOf="DatePickerEnd" Margin="20, 0, 0, 0" />
</RelativePanel>
<TextBlock x:Uid="AddAssetDuration" Text="" HorizontalAlignment="Left" Margin="20, 20, 20, 2"/>
<TextBox x:Uid="AddAssetDurationTextBox" x:Name="TextBoxDuration" Margin="20,2" MaxLength="30" PlaceholderText="" InputScope="Number"/>
<TextBlock x:Uid="AddAssetEnable" Text="" HorizontalAlignment="Left" Margin="20, 20, 20, 2"/>
<ToggleSwitch x:Uid="AddAssetToggle" x:Name="ToggleSwitchEnable" HorizontalAlignment="Left" Margin="20, 2" OnContent="" OffContent=""/>
<TextBlock x:Uid="AddAssetCache" Text="" HorizontalAlignment="Left" Margin="20, 20, 20, 2"/>
<ToggleSwitch x:Uid="AddAssetToggle" x:Name="ToggleSwitchDisableCache" HorizontalAlignment="Left" Margin="20, 2" OnContent="" OffContent=""/>
<TextBlock x:Uid="AddAssetDevice" x:Name="TextBlockDevice" Text="" HorizontalAlignment="Left" Margin="20, 20, 20, 2"/>
<GridView x:Name="GridViewDevices" SelectionMode="Multiple" Margin="20,2">
<GridView.ItemTemplate>
<DataTemplate x:DataType="local:Device">
<Grid Height="52" Width="210" Margin="4,4,4,8">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="48"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="3*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Image Grid.RowSpan="2" Grid.Column="0" Source="Assets/raspberry-36.png" HorizontalAlignment="Left" VerticalAlignment="Center" Stretch="None"/>
<TextBlock Grid.Row="0" Grid.Column="1" Text="{x:Bind Name}" Margin="4,2,4,0" HorizontalAlignment="Left"/>
<TextBlock Grid.Row="1" Grid.Column="1" Text="{x:Bind Location}" Margin="4,0,4,2" HorizontalAlignment="Left" FontSize="12"/>
</Grid>
</DataTemplate>
</GridView.ItemTemplate>
</GridView>
<RelativePanel Margin="20, 30, 20, 2" HorizontalAlignment="Right">
<Button x:Uid="AddAssetSubmit" Grid.Column="1" x:Name="ButtonSubmit" Content="" Width="100" HorizontalAlignment="Right" Margin="0, 0, 20, 0" Click="ButtonSubmit_Click"/>
<Button x:Uid="AddAssetCancel" RelativePanel.RightOf="ButtonSubmit" Grid.Column="2" Width="100" x:Name="ButtonCancel" Content="" Padding="20, 4" HorizontalAlignment="Right" Click="ButtonCancel_Click"/>
</RelativePanel>
</StackPanel>
</ScrollViewer>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup>
<VisualState x:Name="Narrow">
<VisualState.StateTriggers>
<AdaptiveTrigger MinWindowWidth="296" />
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="TimePickerStart.(RelativePanel.Below)" Value="DatePickerStart" />
<Setter Target="TimePickerStart.(RelativePanel.AlignLeftWith)" Value="DatePickerStart" />
<Setter Target="TimePickerStart.(Margin)" Value="20,10,0,0" />
<Setter Target="TimePickerEnd.(RelativePanel.Below)" Value="DatePickerEnd" />
<Setter Target="TimePickerEnd.(RelativePanel.AlignLeftWith)" Value="DatePickerEnd" />
<Setter Target="TimePickerEnd.(Margin)" Value="20,10,0,0" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Wide">
<VisualState.StateTriggers>
<AdaptiveTrigger MinWindowWidth="600" />
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="TimePickerStart.(RelativePanel.RightOf)" Value="DatePickerStart" />
<Setter Target="TimePickerEnd.(RelativePanel.RightOf)" Value="DatePickerEnd" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Grid>
</Page>