Skip to content

Commit

Permalink
Merge pull request #761 from Microsoft/codeextend
Browse files Browse the repository at this point in the history
Add POCO code sample for MasterDetailsView
  • Loading branch information
deltakosh authored Jan 3, 2017
2 parents ef38258 + a77a01a commit c767ca2
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@
<Content Include="SamplePages\SurfaceDialTextboxHelper\SurfaceDialTextboxHelperCode.bind">
<SubType>Designer</SubType>
</Content>
<Content Include="SamplePages\MasterDetailsView\MasterDetailsViewCode.bind" />
</ItemGroup>
<ItemGroup>
<Compile Include="App.xaml.cs">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Example of POCO to use with MasterDetailsView

Emails = new List<Email>
{
new Email { From = "Steve Johnson", Subject = "Lunch Tomorrow", Body = "Are you available for lunch tomorrow? A client would like to discuss a project with you." },
new Email { From = "Becky Davidson", Subject = "Kids game", Body = "Don't forget the kids have their soccer game this Friday. We have to supply end of game snacks." },
new Email { From = "OneDrive", Subject = "Check out your event recap", Body = "Your new album.\r\nYou uploaded some photos to yuor OneDrive and automatically created an album for you." },
new Email { From = "Twitter", Subject = "Follow randomPerson, APersonYouMightKnow", Body = "Here are some people we think you might like to follow:\r\n.@randomPerson\r\nAPersonYouMightKnow" },
};
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,8 @@
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;

// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238

namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class ReorderGridPage : Page
{
public ReorderGridPage()
Expand Down
1 change: 1 addition & 0 deletions Microsoft.Toolkit.Uwp.SampleApp/SamplePages/samples.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"About": "The MasterDetailsView control allows the user to implement the Master/Details design pattern defined by https://msdn.microsoft.com/en-gb/windows/uwp/controls-and-patterns/master-details",
"CodeUrl": "https://github.com/Microsoft/UWPCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/MasterDetailsView",
"XamlCodeFile": "MasterDetailsView.bind",
"CodeFile": "MasterDetailsViewCode.bind",
"Icon": "/SamplePages/MasterDetailsView/MasterDetailsView.png"
},
{
Expand Down
2 changes: 1 addition & 1 deletion Microsoft.Toolkit.Uwp.UI.Animations/Behaviors/Light.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public double Distance
/// <summary>
/// Starts the animation.
/// </summary>
public async override void StartAnimation()
public override void StartAnimation()
{
if (AnimationExtensions.IsLightingSupported)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
using System.Threading.Tasks;
using Microsoft.Graphics.Canvas;
using Microsoft.Graphics.Canvas.Effects;
using Windows.UI;
using Windows.UI.Composition;
using Windows.UI.Composition.Effects;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Hosting;
using Windows.UI;

namespace Microsoft.Toolkit.Uwp.UI.Animations
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ private void SetGaugeValueFromPoint(Point p)
divider = 360;
}

var value = Minimum + ((Maximum - Minimum) * (Mod(angle - NormalizedMinAngle, 360)) / divider);
var value = Minimum + ((Maximum - Minimum) * Mod(angle - NormalizedMinAngle, 360) / divider);
if (value < Minimum || value > Maximum)
{
// Ignore positions outside the scale angle.
Expand Down
2 changes: 1 addition & 1 deletion UnitTests/Helpers/Test_StreamHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@

using System;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Toolkit.Uwp;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using Windows.ApplicationModel;
using Windows.Storage;
using System.Threading;

namespace UnitTests.Helpers
{
Expand Down

0 comments on commit c767ca2

Please sign in to comment.