Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,20 @@
<Name>CollectionViewChallenge</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\xamarin.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\sharepoint.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\sitecore.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\azure.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\GenericBackground.png" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
</Project>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<!-- You can also set colorControlNormal, colorControlActivated
colorControlHighlight and colorSwitchThumbNormal. -->
<item name="windowActionModeOverlay">true</item>

<item name="android:windowTranslucentStatus">true</item>
<item name="android:datePickerDialogTheme">@style/AppCompatDialogStyle</item>
</style>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="4.0.0.346134-pre9" />
<PackageReference Include="Xamarin.Essentials" Version="1.1.0" />
<PackageReference Include="Xamarin.Forms.Visual.Material">
<Version>3.6.0.344457</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<ItemGroup>
Expand All @@ -143,4 +146,34 @@
<Name>CollectionViewChallenge</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\xamarin.png">
<Generator>MSBuild:UpdateGeneratedFiles</Generator>
<SubType>Designer</SubType>
</BundleResource>
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\sitecore.png">
<Generator>MSBuild:UpdateGeneratedFiles</Generator>
<SubType>Designer</SubType>
</BundleResource>
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\sharepoint.png">
<Generator>MSBuild:UpdateGeneratedFiles</Generator>
<SubType>Designer</SubType>
</BundleResource>
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\GenericBackground.png">
<Generator>MSBuild:UpdateGeneratedFiles</Generator>
<SubType>Designer</SubType>
</BundleResource>
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\azure.png">
<Generator>MSBuild:UpdateGeneratedFiles</Generator>
<SubType>Designer</SubType>
</BundleResource>
</ItemGroup>
</Project>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 34 additions & 28 deletions CollectionViewChallenge/CollectionViewChallenge/AppShell.xaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<Shell xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:CollectionViewChallenge.Views"
RouteHost="companyname.com"
RouteScheme="app"
Route="CollectionViewChallenge"
FlyoutBehavior="Disabled"
Title="CollectionViewChallenge"
x:Class="CollectionViewChallenge.AppShell">
<?xml version="1.0" encoding="UTF-8" ?>
<Shell
x:Class="CollectionViewChallenge.AppShell"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:CollectionViewChallenge.Views"
Title="CollectionViewChallenge"
FlyoutBehavior="Disabled"
Route="CollectionViewChallenge"
RouteHost="companyname.com"
RouteScheme="app"
Visual="Material">

<!--
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Expand All @@ -28,51 +30,55 @@
XXXXXXO' 'OXXXXXX
XXXXXXXX| |XXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Shell is an all new way to quickly get started with your application. There are 3 levels to a Shell app:
* ShellItem: populates the Flyout menu along with special menu items
* ShellSection: groups of 1 or more ContentPage displayed as bottom tabs
* ShellContent: a ContentPage host. Multiple ShellContent within a ShellSection are navigable by top tabs

For more details about building apps with Shell, visit these resources:
* MSDN Article: https://aka.ms/xf-msdn
* Preview Documentation: https://aka.ms/xf-shell-docs
* Blog Introduction: https://aka.ms/xf-40-blog

PLEASE give us feedback on your experience: good, bad, and ugly.
https://www.surveymonkey.com/r/VTJNWTM

Thanks for trying out this preview!

Thanks for trying out this preview!
- David Ortinau, Senior Program Manager for Mobile Dev Tools [david.ortinau@microsoft.com]
-->

<!--
Styles and Resources
<!--
Styles and Resources
-->
<Shell.Resources>
<ResourceDictionary>
<Color x:Key="NavigationPrimary">#2196F3</Color>
<Color x:Key="NavigationPrimary">#2cb695</Color>
<Style x:Key="BaseStyle" TargetType="Element">
<Setter Property="Shell.ShellBackgroundColor" Value="{StaticResource NavigationPrimary}" />
<Setter Property="Shell.ShellForegroundColor" Value="White" />
<Setter Property="Shell.ShellTitleColor" Value="White" />
<Setter Property="Shell.ShellDisabledColor" Value="#B4FFFFFF" />
<Setter Property="Shell.ShellUnselectedColor" Value="#95FFFFFF" />
<Setter Property="Shell.ShellTabBarBackgroundColor" Value="{StaticResource NavigationPrimary}" />
<Setter Property="Shell.ShellTabBarForegroundColor" Value="White"/>
<Setter Property="Shell.ShellTabBarUnselectedColor" Value="#95FFFFFF"/>
<Setter Property="Shell.ShellTabBarTitleColor" Value="White"/>
<Setter Property="Shell.ShellDisabledColor" Value="#8A8B8C" />
<Setter Property="Shell.ShellUnselectedColor" Value="#8A8B8C" />
<Setter Property="Shell.ShellTabBarBackgroundColor" Value="White" />
<Setter Property="Shell.ShellTabBarForegroundColor" Value="{StaticResource NavigationPrimary}" />
<Setter Property="Shell.ShellTabBarUnselectedColor" Value="#8A8B8C" />
<Setter Property="Shell.ShellTabBarTitleColor" Value="{StaticResource NavigationPrimary}" />
</Style>
<Style BasedOn="{StaticResource BaseStyle}" TargetType="ShellItem" />
<Style x:Key="QuoteText" TargetType="Label">
<Setter Property="TextColor" Value="White" />
<Setter Property="FontAttributes" Value="Italic"/>
</Style>
<Style TargetType="ShellItem" BasedOn="{StaticResource BaseStyle}" />
</ResourceDictionary>
</Shell.Resources>

<!-- Your Pages -->
<!-- Your Pages -->
<ShellItem>
<ShellSection Title="CollectionView" Icon="tab_feed.png">
<ShellContent Title="CollectionView">
<local:CollectionViewChallengePage Title="CollectionView"/>
<local:CollectionViewChallengePage Title="Case Studies" />
</ShellContent>
</ShellSection>
</ShellItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,4 @@
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<Folder Include="Models\" />
<Folder Include="ViewModels\" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace CollectionViewChallenge.Models
{
class CaseStudyModel : Xamarin.Forms.BindableObject
{
public string Icon { get; set; }
public string Project { get; set; }
public string Company { get; set; }
public string Quote { get; set; }
private bool showQuote { get; set; }
public bool ShowQuote
{
get
{
return showQuote;
}
set
{
showQuote = value;
OnPropertyChanged("ShowQuote");
OnPropertyChanged("ShowCompany");
}
}

public bool ShowCompany
{
get
{
return !showQuote;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;

namespace CollectionViewChallenge.Models
{
class ServiceModel : Xamarin.Forms.BindableObject
{
public string Icon { get; set; }
public string Name { get; set; }
public string Description { get; set; }
private bool animate { get; set; }
public bool Animate {
get
{
return animate;
}
set
{
animate = value;
OnPropertyChanged("Animate");
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Text;
using Xamarin.Forms;

namespace CollectionViewChallenge.Triggers
{
public class CaseStudySelectedTriggerAction : TriggerAction<Frame>
{
public CaseStudySelectedTriggerAction() { }

public double Degrees { get; set; }

protected override void Invoke(Frame cell)
{
Animation(cell);
}

private async void Animation(Frame cell)
{
await cell.RotateXTo(Degrees, 400);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;

namespace CollectionViewChallenge.Triggers
{
public class ServiceSelectedTriggerAction : TriggerAction<Grid>
{
public ServiceSelectedTriggerAction() { }

public double Scale { get; set; }

protected override void Invoke(Grid service)
{
Animation(service);
}

private async void Animation(Grid service)
{

await service.ScaleTo(Scale, 400);
await service.ScaleTo(1, 400);
}
}
}
Loading