-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathLookupPageAndroid.xaml
95 lines (93 loc) · 4.17 KB
/
LookupPageAndroid.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
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:model="clr-namespace:PCCE.Model"
xmlns:viewmodel="clr-namespace:PCCE.ViewModel"
x:DataType="viewmodel:LookupViewModel"
x:Class="PCCE.LookupPageAndroid"
Shell.FlyoutBehavior="Disabled"
Loaded="ContentPage_Loaded">
<ContentPage.Resources>
<Style TargetType="Grid">
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="Selected">
<VisualState.Setters>
<Setter Property="BackgroundColor"
Value="#7289da" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
</ContentPage.Resources>
<Grid RowDefinitions="auto,*, 70"
ColumnDefinitions=".35*,.25*,.2*,.2*"
>
<Entry Grid.ColumnSpan="4"
x:Name="SearchEntry"
Placeholder="Search..."
MaxLength="40"
FontSize="0"
HorizontalOptions="FillAndExpand"
ClearButtonVisibility="WhileEditing"
TextChanged="SearchEntry_TextChanged"
/>
<CollectionView x:Name="LookupCollectionView"
Grid.Row="1"
Grid.ColumnSpan="4"
ItemsSource="{Binding ListedItems}"
SelectionMode="Single"
SelectionChanged="LookupCollectionView_SelectionChanged"
SelectedItem="{Binding ItemSelected}"
VerticalOptions="FillAndExpand"
>
<CollectionView.ItemTemplate>
<DataTemplate x:DataType="model:ListedItem">
<Grid Padding="10,1">
<Border HeightRequest="75">
<Grid Padding="0" ColumnDefinitions="75,*,0.9*">
<Image Aspect="AspectFill" Source="{Binding ItemImage}"
WidthRequest="75"
HeightRequest="75"/>
<VerticalStackLayout
Grid.Column="1"
VerticalOptions="Center"
Padding="0">
<Label Text="{Binding ItemIName}" FontSize="14"/>
<Label Text="{Binding ItemID, StringFormat='Item ID : {0}'}" FontSize="12"/>
</VerticalStackLayout>
<VerticalStackLayout
Grid.Column="2"
VerticalOptions="Center"
Padding="5">
<Label Text="{Binding ItemDisplayName}" FontSize="18"/>
</VerticalStackLayout>
</Grid>
</Border>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
<Entry Grid.Row="2"
Grid.Column="0"
x:Name="Incoming"
Text="{Binding IncomingItemID}"
TextChanged="Incoming_TextChanged"
IsVisible="False"/>
<Button Grid.Row="2"
Grid.Column="2"
Grid.ColumnSpan="2"
Margin="10,10"
FontSize="20"
x:Name="BackBtn"
Text="Select"
TextColor="White"
Command="{Binding SelectCommand}"
HorizontalOptions="Fill"
/>
</Grid>
</ContentPage>