1+ <?xml version =" 1.0" encoding =" utf-8" ?>
2+ <ContentPage xmlns =" http://xamarin.com/schemas/2014/forms"
3+ xmlns : x =" http://schemas.microsoft.com/winfx/2009/xaml"
4+ x : Class =" eShopOnContainers.Core.Views.CampaignDetailsView"
5+ xmlns : viewModelBase =" clr-namespace:eShopOnContainers.Core.ViewModels.Base;assembly=eShopOnContainers.Core"
6+ xmlns : templates =" clr-namespace:eShopOnContainers.Core.Views.Templates;assembly=eShopOnContainers.Core"
7+ xmlns : animations =" clr-namespace:eShopOnContainers.Core.Animations;assembly=eShopOnContainers.Core"
8+ xmlns : triggers =" clr-namespace:eShopOnContainers.Core.Triggers;assembly=eShopOnContainers.Core"
9+ viewModelBase:ViewModelLocator.AutoWireViewModel=" true"
10+ Title =" Campaign Details" >
11+ <ContentPage .Resources>
12+ <ResourceDictionary >
13+ <Style x : Key =" CampaignStyle"
14+ TargetType =" {x:Type StackLayout}" >
15+ <Setter Property =" VerticalOptions"
16+ Value =" Center" />
17+ <Setter Property =" Margin"
18+ Value =" 0" />
19+ </Style >
20+ <Style x : Key =" SettingsTitleStyle"
21+ TargetType =" {x:Type Label}" >
22+ <Setter Property =" FontFamily"
23+ Value =" {StaticResource MontserratRegular}" />
24+ <Setter Property =" FontSize"
25+ Value =" {StaticResource MediumSize}" />
26+ <Setter Property =" HorizontalOptions"
27+ Value =" Start" />
28+ <Setter Property =" VerticalOptions"
29+ Value =" Center" />
30+ <Setter Property =" Margin"
31+ Value =" 12, 0" />
32+ </Style >
33+
34+ <Style x : Key =" SettingsDescriptionStyle"
35+ TargetType =" {x:Type Label}"
36+ BasedOn =" {StaticResource SettingsTitleStyle}" >
37+ <Setter Property =" FontSize"
38+ Value =" {StaticResource LittleSize}" />
39+ </Style >
40+ </ResourceDictionary >
41+ </ContentPage .Resources>
42+ <Grid
43+ ColumnSpacing =" 0"
44+ RowSpacing =" 0" >
45+ <Grid .RowDefinitions>
46+ <RowDefinition Height =" Auto" />
47+ </Grid .RowDefinitions>
48+ <!-- CAMPAIGN DETAILS -->
49+ <ScrollView >
50+ <StackLayout
51+ x : Name =" Campaign" >
52+ <Grid >
53+ <Grid .ColumnDefinitions>
54+ <ColumnDefinition Width =" *" />
55+ <ColumnDefinition Width =" Auto" />
56+ </Grid .ColumnDefinitions>
57+ <Grid .RowDefinitions>
58+ <RowDefinition Height =" 1" />
59+ <RowDefinition Height =" Auto" />
60+ <RowDefinition Height =" Auto" />
61+ <RowDefinition Height =" 1" />
62+ </Grid .RowDefinitions>
63+ <Grid
64+ Grid.Row=" 0"
65+ Grid.Column=" 0"
66+ Grid.ColumnSpan=" 2"
67+ BackgroundColor =" Gray" />
68+ <StackLayout
69+ Style =" {StaticResource CampaignStyle}"
70+ Grid.Column=" 0"
71+ Grid.Row=" 1" >
72+ <Image
73+ Grid.Column=" 0"
74+ Grid.Row=" 0"
75+ Source =" {Binding Campaign.PictureUri, Converter={StaticResource ImageConverter}}"
76+ Aspect =" AspectFit"
77+ VerticalOptions =" Start"
78+ Margin =" 12,0,0,0" />
79+ <Label
80+ Text =" {Binding Campaign.Name}"
81+ TextColor =" {StaticResource GreenColor}"
82+ Style =" {StaticResource SettingsTitleStyle}" />
83+ <Label
84+ Text =" {Binding Campaign.Description}"
85+ Style =" {StaticResource SettingsDescriptionStyle}" />
86+ <StackLayout
87+ Style =" {StaticResource CampaignStyle}"
88+ Grid.Row=" 2"
89+ HorizontalOptions =" Center"
90+ Margin =" 12,0,0,0" >
91+ <Label
92+ Text =" {Binding Campaign.From, StringFormat='From {0:MMMM dd, yyyy}'}"
93+ Style =" {StaticResource SettingsDescriptionStyle}" />
94+ <Label
95+ Text =" {Binding Campaign.To, StringFormat='until {0:MMMM dd, yyyy}'}"
96+ Style =" {StaticResource SettingsDescriptionStyle}" />
97+ </StackLayout >
98+ </StackLayout >
99+ </Grid >
100+ </StackLayout >
101+ </ScrollView >
102+ <!-- INDICATOR -->
103+ <ActivityIndicator
104+ Grid.Row=" 0"
105+ Grid.RowSpan=" 2"
106+ Color =" {StaticResource LightGreenColor}"
107+ IsRunning =" {Binding IsBusy}"
108+ IsVisible =" {Binding IsBusy}"
109+ VerticalOptions =" Center"
110+ HorizontalOptions =" Center" >
111+ <ActivityIndicator .WidthRequest>
112+ <OnPlatform
113+ x : TypeArguments =" x:Double"
114+ iOS =" 100"
115+ Android =" 100"
116+ WinPhone =" 400" />
117+ </ActivityIndicator .WidthRequest>
118+ </ActivityIndicator >
119+ </Grid >
120+ </ContentPage >
0 commit comments