Skip to content

Commit

Permalink
Merge pull request #1291 from Microsoft/dev
Browse files Browse the repository at this point in the history
Merging dev to master for 1.5
  • Loading branch information
nmetulev committed Jul 5, 2017
2 parents 75ecc93 + 894a3d7 commit 87b2420
Show file tree
Hide file tree
Showing 252 changed files with 17,835 additions and 1,190 deletions.
2 changes: 1 addition & 1 deletion Microsoft.Toolkit.Uwp.DeveloperTools/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.2.2"
"Microsoft.NETCore.UniversalWindowsPlatform": "5.2.3"
},
"frameworks": {
"uap10.0": {}
Expand Down
236 changes: 155 additions & 81 deletions Microsoft.Toolkit.Uwp.SampleApp/App.xaml

Large diffs are not rendered by default.

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.
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.
Binary file added Microsoft.Toolkit.Uwp.SampleApp/Assets/pixel.png
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 @@ -2,7 +2,6 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Microsoft.Toolkit.UwpSampleApp.Controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="300"
d:DesignWidth="400"
Expand Down
Binary file modified Microsoft.Toolkit.Uwp.SampleApp/Icons/Animations.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Microsoft.Toolkit.Uwp.SampleApp/Icons/DeveloperTools.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Microsoft.Toolkit.Uwp.SampleApp/Icons/Foundation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Microsoft.Toolkit.Uwp.SampleApp/Icons/Helpers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Microsoft.Toolkit.Uwp.SampleApp/Icons/Notifications.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Microsoft.Toolkit.Uwp.SampleApp/Icons/Services.png
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 @@ -11,7 +11,7 @@
<AssemblyName>Microsoft.Toolkit.Uwp.SampleApp</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.14393.0</TargetPlatformVersion>
<TargetPlatformVersion>10.0.15063.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10586.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
Expand Down Expand Up @@ -130,6 +130,15 @@
<Content Include="Assets\NotificationAssets\Sunny.png" />
<Content Include="Assets\NotificationAssets\Thunderstorms-Square.png" />
<Content Include="Assets\NotificationAssets\Thunderstorms.png" />
<Content Include="Assets\People\dave.png" />
<Content Include="Assets\People\david.png" />
<Content Include="Assets\People\giorgio.png" />
<Content Include="Assets\People\jeff.png" />
<Content Include="Assets\People\nikola.png" />
<Content Include="Assets\People\pete.png" />
<Content Include="Assets\People\petri.png" />
<Content Include="Assets\People\shen.png" />
<Content Include="Assets\People\vlad.png" />
<Content Include="Assets\Photos\BigFourSummerHeat.jpg" />
<Content Include="Assets\Photos\BisonBadlandsChillin.jpg" />
<Content Include="Assets\Photos\ColumbiaRiverGorge.jpg" />
Expand Down Expand Up @@ -260,17 +269,20 @@
<Content Include="SamplePages\MarkdownTextBlock\MarkdownTextBlock.png" />
<Content Include="SamplePages\Loading\Loading.png" />
<Content Include="SamplePages\MasterDetailsView\MasterDetailsView.png" />
<Content Include="SamplePages\Menu\Menu.png" />
<Content Include="SamplePages\Microsoft Graph Service\OfficeLogo.png" />
<Content Include="SamplePages\Microsoft Graph Service\user.png" />
<Content Include="SamplePages\Microsoft Translator Service\TranslatorService.png" />
<Content Include="SamplePages\OneDrive Service\OneDriveLogo.png" />
<Content Include="SamplePages\Saturation\SaturationBehavior.png" />
<Content Include="SamplePages\OrbitView\OrbitView.png" />
<Content Include="SamplePages\TileControl\Animations.png" />
<Content Include="SamplePages\TileControl\TileControl.png" />
<Content Include="SamplePages\Offset\OffsetBehavior.png" />
<Content Include="SamplePages\ParallaxService\Parallax.png" />
<Content Include="SamplePages\PrintHelper\PrintHelper.png" />
<Content Include="SamplePages\PullToRefreshListView\PullToRefreshListView.png" />
<Content Include="SamplePages\RadialProgressBar\RadialProgressBar.png" />
<Content Include="SamplePages\ScrollHeader\ScrollHeader.png" />
<Content Include="SamplePages\RadialGauge\RadialGauge.png" />
<Content Include="SamplePages\RangeSelector\RangeSelector.png" />
Expand Down Expand Up @@ -371,6 +383,7 @@
<Content Include="SamplePages\MarkdownTextBlock\InitialContent.md" />
<Content Include="SamplePages\AdvancedCollectionView\AdvancedCollectionView.bind" />
<Content Include="SamplePages\TextBoxRegex\TextBoxRegex.bind" />
<Content Include="SamplePages\RadialProgressBar\RadialProgressBarCode.bind" />
<Content Include="SamplePages\MarkdownTextBlock\MarkdownTextBlockCode.bind" />
<Content Include="SamplePages\OneDrive Service\OneDriveCode.bind" />
<Content Include="SamplePages\Analytics\AnalyticsCode.bind" />
Expand All @@ -382,6 +395,9 @@
<Content Include="SamplePages\Carousel\CarouselCode.bind" />
<Content Include="SamplePages\AlignmentGrid\AlignmentGridXaml.bind" />
<Content Include="SamplePages\FocusTracker\FocusTrackerXaml.bind" />
<Content Include="SamplePages\BluetoothLEHelper\BluetoothLEHelperCode.bind" />
<Content Include="SamplePages\OrbitView\OrbitViewXaml.bind" />
<Content Include="SamplePages\Menu\Menu.bind" />
</ItemGroup>
<ItemGroup>
<Compile Include="App.xaml.cs">
Expand All @@ -399,16 +415,26 @@
<Compile Include="SamplePages\AdvancedCollectionView\AdvancedCollectionViewPage.xaml.cs">
<DependentUpon>AdvancedCollectionViewPage.xaml</DependentUpon>
</Compile>
<Compile Include="SamplePages\BluetoothLEHelper\BluetoothLEHelperPage.xaml.cs">
<DependentUpon>BluetoothLEHelperPage.xaml</DependentUpon>
</Compile>
<Compile Include="SamplePages\Menu\Commands\VsCommands.cs" />
<Compile Include="SamplePages\Menu\MenuPage.xaml.cs">
<DependentUpon>MenuPage.xaml</DependentUpon>
</Compile>
<Compile Include="SamplePages\NetworkHelper\NetworkHelperPage.xaml.cs">
<DependentUpon>NetworkHelperPage.xaml</DependentUpon>
</Compile>
<Compile Include="SamplePages\FocusTracker\FocusTrackerPage.xaml.cs">
<DependentUpon>FocusTrackerPage.xaml</DependentUpon>
</Compile>
<Compile Include="SamplePages\BackgroundTaskHelper\TestBackgroundTask.cs" />
<Compile Include="SamplePages\OrbitView\OrbitViewPage.xaml.cs">
<DependentUpon>OrbitViewPage.xaml</DependentUpon>
</Compile>
<Compile Include="SamplePages\ViewExtensions\ViewExtensionsPage.xaml.cs">
<DependentUpon>ViewExtensionsPage.xaml</DependentUpon>
</Compile>
</Compile>
<Compile Include="SamplePages\Carousel\CarouselPage.xaml.cs">
<DependentUpon>CarouselPage.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -474,6 +500,9 @@
<Compile Include="SamplePages\TileControl\TileControlPage.xaml.cs">
<DependentUpon>TileControlPage.xaml</DependentUpon>
</Compile>
<Compile Include="SamplePages\RadialProgressBar\RadialProgressBarPage.xaml.cs">
<DependentUpon>RadialProgressBarPage.xaml</DependentUpon>
</Compile>
<Compile Include="SamplePages\ScrollHeader\ScrollHeaderPage.xaml.cs">
<DependentUpon>ScrollHeaderPage.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -638,10 +667,22 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="SamplePages\BluetoothLEHelper\BluetoothLEHelperPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="SamplePages\FocusTracker\FocusTrackerPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="SamplePages\Menu\MenuPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="SamplePages\OrbitView\OrbitViewPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="SamplePages\ViewExtensions\ViewExtensionsPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand Down Expand Up @@ -706,6 +747,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="SamplePages\RadialProgressBar\RadialProgressBarPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="SamplePages\ScrollHeader\ScrollHeaderPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand Down
5 changes: 4 additions & 1 deletion Microsoft.Toolkit.Uwp.SampleApp/Models/Sample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,10 @@ public string UpdatedXamlCode
var value = proxy[option.Name] as ValueHolder;
if (value != null)
{
result = result.Replace(option.OriginalString, value.Value.ToString());
var newString = value.Value is Windows.UI.Xaml.Media.SolidColorBrush brush ?
brush.Color.ToString() : value.Value.ToString();

result = result.Replace(option.OriginalString, newString);
}
}

Expand Down
11 changes: 6 additions & 5 deletions Microsoft.Toolkit.Uwp.SampleApp/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,22 @@
<uap:SplashScreen Image="Assets\UWPCommunityToolkitSampleAppSplashScreen.png" BackgroundColor="#242424" />
</uap:VisualElements>
<Extensions>
<uap:Extension Category="windows.protocol">
<uap:Protocol Name="uwpct">
<uap:DisplayName>UWP Community Toolkit</uap:DisplayName>
</uap:Protocol>
</uap:Extension>
<Extension Category="windows.backgroundTasks" EntryPoint="Microsoft.Toolkit.Uwp.Samples.BackgroundTasks.TestBackgroundTask">
<BackgroundTasks>
<Task Type="timer" />
</BackgroundTasks>
</Extension>
<uap:Extension Category="windows.protocol">
<uap:Protocol Name="uwpct">
<uap:DisplayName>UWP Community Toolkit</uap:DisplayName>
</uap:Protocol>
</uap:Extension>
</Extensions>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
<DeviceCapability Name="location" />
<DeviceCapability Name="bluetooth" />
</Capabilities>
</Package>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
<controls:BladeView Margin="0"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
BladeMode="@[BladeMode:Enum:BladeMode.Normal]">
BladeMode="@[BladeMode:Enum:BladeMode.Normal]"
AutoCollapseCountThreshold="@[AutoCollapseCountThreshold:String:4]">
<controls:BladeItem Title="Test"
IsOpen="True"
TitleBarVisibility="Collapsed">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<Grid Background="{StaticResource Brush-Grey-05}">
<controls:BladeView x:Name="BladeView"
Padding="0"
AutoCollapseCountThreshold="{Binding AutoCollapseCountThreshold.Value}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
BladeMode="{Binding BladeMode.Value}">
Expand All @@ -36,6 +37,9 @@
<ToggleButton Margin="0,24,0,0"
Content="Custom close button"
IsChecked="{Binding IsOpen, Mode=TwoWay, ElementName=FourthBlade}" />
<Button Margin="0,24,0,0"
Content="Add blade"
Click="OnAddBladeButtonClicked" />
</StackPanel>
</controls:BladeItem>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
// ******************************************************************

using Microsoft.Toolkit.Uwp.UI.Controls;
using Windows.UI.Xaml;

namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
{
/// <summary>
Expand All @@ -21,5 +24,17 @@ public BladePage()
{
InitializeComponent();
}

private void OnAddBladeButtonClicked(object sender, RoutedEventArgs e)
{
BladeItem bladeItem = new BladeItem()
{
Title = "Default blade",
Width = 400,
IsOpen = true
};

BladeView?.Items?.Add(bladeItem);
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Get a local copy of the context for easier reading
BluetoothLEHelper bluetoothLEHelper = BluetoothLEHelper.Context;

// check if BluetoothLE APIs are available
if (BluetoothLEHelper.IsBluetoothLESupported)
{
// Start the Enumeration
bluetoothLEHelper.StartEnumeration();

// At this point the user needs to select a device they want to connect to. This can be done by
// creating a ListView and binding the bluetoothLEHelper collection to it. Once a device is found,
// the Connect() method can be called to connect to the device and start interacting with its services

// Connect to a device if your choice
ObservableBluetoothLEDevice device = bluetoothLEHelper.BluetoothLeDevices[<Device you choose>];
await device.ConnectAsync();

// At this point the device is connected and the Services property is populated.

// See all the services
var services = device.Services;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<Page
x:Class="Microsoft.Toolkit.Uwp.SampleApp.SamplePages.BluetoothLEHelperPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:bt="using:Microsoft.Toolkit.Uwp"
mc:Ignorable="d">

<Grid Background="{StaticResource Brush-Grey-05}">
<RelativePanel x:Name="MainContent" Visibility="Collapsed" >
<Button x:Name="BtEnumeration" Click="Enumeration_Click" Content="Start enumeration" Margin="10"/>
<ListView x:Name="LVDevices" Height="200" VerticalAlignment="Top" Margin="10" ItemsSource="{x:Bind bluetoothLEHelper.BluetoothLeDevices}" Background="White" SelectionChanged="LVDevices_SelectionChanged" RelativePanel.Below="BtEnumeration" RelativePanel.AlignLeftWithPanel="True" RelativePanel.AlignRightWithPanel="True">
<ListView.ItemTemplate>
<DataTemplate x:DataType="bt:ObservableBluetoothLEDevice">
<StackPanel>
<TextBlock Text="{x:Bind Name, Mode=OneWay}"></TextBlock>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<StackPanel Name="SPDevice" Margin="10" RelativePanel.Below="LVDevices">
<TextBlock x:Name="TbDeviceName" Text="" />
<TextBlock x:Name="TbDeviceBtAddr" Text="" />
</StackPanel>

<ComboBox x:Name="CBServices" Margin="10" SelectionChanged="CBServices_SelectionChanged" RelativePanel.Below="SPDevice" Visibility="Collapsed">
<ComboBox.ItemTemplate>
<DataTemplate x:DataType="bt:ObservableGattDeviceService" >
<TextBlock >
<Run Text="Service Name: " />
<Run Text="{x:Bind Name}" />
</TextBlock>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>

<ComboBox x:Name="CBCharacteristic" Margin="10" SelectionChanged="CBCharacteristic_SelectionChanged" RelativePanel.Below="CBServices" Visibility="Collapsed">
<ComboBox.ItemTemplate>
<DataTemplate x:DataType="bt:ObservableGattCharacteristics" >
<TextBlock >
<Run Text="Characteristic Name: " />
<Run Text="{x:Bind Name}" />
</TextBlock>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>

<Button x:Name="BtReadCharValue" Margin="10" Click="ReadCharValue_Click" Content="Read Value" RelativePanel.Below="CBCharacteristic" Visibility="Collapsed"/>

<TextBlock x:Name="TBCharValue" Margin="10" RelativePanel.Below="BtReadCharValue"/>

</RelativePanel>
<TextBlock x:Name="NotAvailableMessage" Text="BluetoothLE requires the Windows 10 Creators Update"
VerticalAlignment="Center" HorizontalAlignment="Center"
Foreground="{ThemeResource SystemControlForegroundAccentBrush}"
FontSize="20"
TextWrapping="WrapWholeWords"
TextAlignment="Center" Margin="40"
Visibility="Collapsed"></TextBlock>
</Grid>
</Page>
Loading

0 comments on commit 87b2420

Please sign in to comment.