Skip to content

Commit

Permalink
Merge pull request #62 from windows-toolkit/michael-hawker/update-nugets
Browse files Browse the repository at this point in the history
Update to 7.0.0-preview4
  • Loading branch information
azchohfi authored Nov 18, 2020
2 parents 08761cd + 2c5ed2b commit c10f2aa
Show file tree
Hide file tree
Showing 16 changed files with 283 additions and 233 deletions.
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<IsUwpProject Condition="'$(IsDesignProject)' != 'true'">$(MSBuildProjectName.Contains('Uwp'))</IsUwpProject>
<IsSampleProject>$(MSBuildProjectName.Contains('Sample'))</IsSampleProject>
<IsWpfProject>$(MSBuildProjectName.Contains('Wpf'))</IsWpfProject>
<DefaultTargetPlatformVersion>17763</DefaultTargetPlatformVersion>
<DefaultTargetPlatformMinVersion>16299</DefaultTargetPlatformMinVersion>
<DefaultTargetPlatformVersion>19041</DefaultTargetPlatformVersion>
<DefaultTargetPlatformMinVersion>17763</DefaultTargetPlatformMinVersion>
<PackageOutputPath>$(MSBuildThisFileDirectory)bin\nupkg</PackageOutputPath>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using System.Linq;
using System.Threading;
using Microsoft.Graph;
using Microsoft.Toolkit.Uwp.Helpers;
using Microsoft.Toolkit.Uwp.Extensions;
using Newtonsoft.Json.Linq;
using Windows.System;
using Windows.UI.Xaml;
Expand Down Expand Up @@ -104,7 +104,7 @@ private async void GraphPresenter_Loaded(object sender, RoutedEventArgs e)
data = values.ToObject(ResponseType);
}

_ = DispatcherQueueHelper.ExecuteOnUIThreadAsync(dispatcherQueue, () => Content = data);
_ = dispatcherQueue.EnqueueAsync(() => Content = data);
}
catch
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,37 +1,43 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Microsoft.Toolkit.Graph.Controls"
xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters"
xmlns:graphconverters="using:Microsoft.Toolkit.Graph.Converters">
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters"
xmlns:graphconverters="using:Microsoft.Toolkit.Graph.Converters"
xmlns:local="using:Microsoft.Toolkit.Graph.Controls">

<converters:BoolNegationConverter x:Key="InverseBoolConverter"/>
<converters:EmptyObjectToObjectConverter x:Key="InverseNullToVisibilityConverter" EmptyValue="Visible" NotEmptyValue="Collapsed"/>
<graphconverters:UserToPersonConverter x:Key="UserToPersonConverter"/>
<converters:BoolNegationConverter x:Key="InverseBoolConverter" />
<converters:EmptyObjectToObjectConverter x:Key="InverseNullToVisibilityConverter"
EmptyValue="Visible"
NotEmptyValue="Collapsed" />
<graphconverters:UserToPersonConverter x:Key="UserToPersonConverter" />

<Style TargetType="local:LoginButton">
<Setter Property="Padding" Value="4" />
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Top"/>
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="local:LoginButton">
<!-- TODO: In Future Use DropDownButton -->
<!-- TODO: In Future Use DropDownButton -->
<Button x:Name="PART_LoginButton"
Margin="{TemplateBinding Padding}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
IsEnabled="{Binding IsLoading, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource TemplatedParent}}">
<StackPanel Orientation="Horizontal">
<local:PersonView PersonDetails="{Binding UserDetails, Converter={StaticResource UserToPersonConverter}, RelativeSource={RelativeSource TemplatedParent}}" ShowName="True"/>
<TextBlock Visibility="{Binding UserDetails, Converter={StaticResource InverseNullToVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}"
VerticalAlignment="Center">Sign In</TextBlock>
<local:PersonView PersonDetails="{Binding UserDetails, Converter={StaticResource UserToPersonConverter}, RelativeSource={RelativeSource TemplatedParent}}"
ShowName="True" />
<TextBlock VerticalAlignment="Center"
Visibility="{Binding UserDetails, Converter={StaticResource InverseNullToVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}">
Sign In
</TextBlock>
</StackPanel>
<FlyoutBase.AttachedFlyout>
<Flyout>
<StackPanel>
<local:PersonView PersonDetails="{Binding UserDetails, Converter={StaticResource UserToPersonConverter}, RelativeSource={RelativeSource TemplatedParent}}" ShowName="True" ShowEmail="True"/>
<local:PersonView PersonDetails="{Binding UserDetails, Converter={StaticResource UserToPersonConverter}, RelativeSource={RelativeSource TemplatedParent}}"
ShowEmail="True"
ShowName="True" />
<HyperlinkButton x:Name="PART_SignOutButton">Sign Out</HyperlinkButton>
</StackPanel>
</Flyout>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,34 +1,39 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Microsoft.Toolkit.Graph.Controls"
xmlns:ex="using:Microsoft.Toolkit.Uwp.UI.Extensions">
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ex="using:Microsoft.Toolkit.Uwp.UI.Extensions"
xmlns:local="using:Microsoft.Toolkit.Graph.Controls">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/TokenizingTextBox/TokenizingTextBox.xaml" />
</ResourceDictionary.MergedDictionaries>

<Style TargetType="local:PeoplePicker" BasedOn="{StaticResource DefaultPeoplePickerStyle}"/>
<Style BasedOn="{StaticResource DefaultPeoplePickerStyle}"
TargetType="local:PeoplePicker" />

<Style x:Key="DefaultPeoplePickerStyle" TargetType="local:PeoplePicker" BasedOn="{StaticResource DefaultTokenizingTextBoxStyle}">
<Style x:Key="DefaultPeoplePickerStyle"
BasedOn="{StaticResource DefaultTokenizingTextBoxStyle}"
TargetType="local:PeoplePicker">
<Setter Property="QueryIcon">
<Setter.Value>
<SymbolIconSource Symbol="Find"/>
<SymbolIconSource Symbol="Find" />
</Setter.Value>
</Setter>
<Setter Property="PlaceholderText" Value="Start typing a name"/>
<Setter Property="TextMemberPath" Value="DisplayName"/>
<Setter Property="TokenDelimiter" Value=","/>
<Setter Property="PlaceholderText" Value="Start typing a name" />
<Setter Property="TextMemberPath" Value="DisplayName" />
<Setter Property="TokenDelimiter" Value="," />
<Setter Property="SuggestedItemTemplate">
<Setter.Value>
<DataTemplate>
<local:PersonView PersonDetails="{Binding}" ShowName="True" ShowEmail="True"/>
<local:PersonView PersonDetails="{Binding}"
ShowEmail="True"
ShowName="True" />
</DataTemplate>
</Setter.Value>
</Setter>
<Setter Property="TokenItemTemplate">
<Setter.Value>
<DataTemplate>
<local:PersonView PersonDetails="{Binding}" ShowName="True"/>
<local:PersonView PersonDetails="{Binding}"
ShowName="True" />
</DataTemplate>
</Setter.Value>
</Setter>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,67 +1,72 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Microsoft.Toolkit.Graph.Controls"
xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters">
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters"
xmlns:local="using:Microsoft.Toolkit.Graph.Controls">

<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"/>
<converters:EmptyObjectToObjectConverter x:Key="NullToVisibilityConverter" EmptyValue="Collapsed" NotEmptyValue="Visible"/>
<converters:EmptyObjectToObjectConverter x:Key="InverseNullToVisibilityConverter" EmptyValue="Visible" NotEmptyValue="Collapsed"/>
<converters:BoolToObjectConverter x:Key="BoolToSizeConverter" FalseValue="24" TrueValue="48"/>
<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" />
<converters:EmptyObjectToObjectConverter x:Key="NullToVisibilityConverter"
EmptyValue="Collapsed"
NotEmptyValue="Visible" />
<converters:EmptyObjectToObjectConverter x:Key="InverseNullToVisibilityConverter"
EmptyValue="Visible"
NotEmptyValue="Collapsed" />
<converters:BoolToObjectConverter x:Key="BoolToSizeConverter"
FalseValue="24"
TrueValue="48" />

<x:String x:Key="PersonViewDefaultImageSource">ms-appx:///Microsoft.Toolkit.Graph.Controls/Assets/person.png</x:String>

<Style TargetType="local:PersonView">
<Setter Property="Padding" Value="4,4,0,4" />
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Top"/>
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="UserPhoto">
<Setter.Value>
<BitmapImage UriSource="{StaticResource PersonViewDefaultImageSource}"/>
<BitmapImage UriSource="{StaticResource PersonViewDefaultImageSource}" />
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="local:PersonView">
<Grid
Margin="{TemplateBinding Padding}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Height="{Binding IsLargeImage, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToSizeConverter}}">
<Grid Height="{Binding IsLargeImage, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToSizeConverter}}"
Margin="{TemplateBinding Padding}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="{Binding IsLargeImage, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToSizeConverter}}"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="{Binding IsLargeImage, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToSizeConverter}}" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Ellipse VerticalAlignment="Stretch"
HorizontalAlignment="Stretch"
Visibility="{Binding UserPhoto, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource NullToVisibilityConverter}}"
ToolTipService.ToolTip="{Binding PersonDetails.DisplayName, RelativeSource={RelativeSource TemplatedParent}}">
<Ellipse HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
ToolTipService.ToolTip="{Binding PersonDetails.DisplayName, RelativeSource={RelativeSource TemplatedParent}}"
Visibility="{Binding UserPhoto, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource NullToVisibilityConverter}}">
<Ellipse.Fill>
<ImageBrush ImageSource="{Binding UserPhoto, RelativeSource={RelativeSource TemplatedParent}}"
Stretch="UniformToFill"/>
Stretch="UniformToFill" />
</Ellipse.Fill>
</Ellipse>
<Grid Visibility="{Binding UserPhoto, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseNullToVisibilityConverter}}"
ToolTipService.ToolTip="{Binding PersonDetails.DisplayName, RelativeSource={RelativeSource TemplatedParent}}">
<Ellipse VerticalAlignment="Stretch"
HorizontalAlignment="Stretch"
Fill="DarkMagenta"/>
<TextBlock Foreground="White"
VerticalAlignment="Center"
<Grid ToolTipService.ToolTip="{Binding PersonDetails.DisplayName, RelativeSource={RelativeSource TemplatedParent}}"
Visibility="{Binding UserPhoto, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource InverseNullToVisibilityConverter}}">
<Ellipse HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Fill="DarkMagenta" />
<TextBlock Margin="0,-2,0,0"
HorizontalAlignment="Center"
Margin="0,-2,0,0"
Text="{Binding Initials, RelativeSource={RelativeSource TemplatedParent}}"/>
VerticalAlignment="Center"
Foreground="White"
Text="{Binding Initials, RelativeSource={RelativeSource TemplatedParent}}" />
</Grid>
<StackPanel VerticalAlignment="Center" Grid.Column="2">
<TextBlock Visibility="{Binding ShowName, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityConverter}}"
Text="{Binding PersonDetails.DisplayName, RelativeSource={RelativeSource TemplatedParent}}"
Margin="4,-2,2,0"
FontWeight="SemiBold"/>
<TextBlock Visibility="{Binding ShowEmail, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityConverter}}"
<StackPanel Grid.Column="2"
VerticalAlignment="Center">
<TextBlock Margin="4,-2,2,0"
FontWeight="SemiBold"
Text="{Binding PersonDetails.DisplayName, RelativeSource={RelativeSource TemplatedParent}}"
Visibility="{Binding ShowName, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityConverter}}" />
<TextBlock Margin="4,0,2,0"
FontSize="12"
Text="{Binding PersonDetails.EmailAddresses[0].Address, RelativeSource={RelativeSource TemplatedParent}}"
Margin="4,0,2,0"
FontSize="12"/>
Visibility="{Binding ShowEmail, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BoolToVisibilityConverter}}" />
</StackPanel>
</Grid>
</ControlTemplate>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="MSBuild.Sdk.Extras">

<PropertyGroup>
<TargetFramework>uap10.0.16299</TargetFramework>
<TargetFramework>uap10.0.17763</TargetFramework>
<Title>Windows Community Toolkit Graph Controls</Title>
<PackageId>Microsoft.Toolkit.Graph.Controls</PackageId>
<Description>
Expand All @@ -25,8 +25,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Toolkit.Uwp.UI" Version="7.0.0-preview2" />
<PackageReference Include="Microsoft.Toolkit.Uwp.UI.Controls" Version="7.0.0-preview2" />
<PackageReference Include="Microsoft.Toolkit.Uwp.UI" Version="7.0.0-preview4" />
<PackageReference Include="Microsoft.Toolkit.Uwp.UI.Controls" Version="7.0.0-preview4" />
<ProjectReference Include="..\Microsoft.Toolkit.Graph\Microsoft.Toolkit.Graph.csproj" />
</ItemGroup>

Expand All @@ -35,7 +35,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Graph.Beta" Version="0.21.0-preview" />
<PackageReference Include="Microsoft.Graph.Beta" Version="0.32.0-preview" />
<PackageReference Include="Microsoft.Graph.Auth" Version="1.0.0-preview.5" />
</ItemGroup>

Expand Down
8 changes: 4 additions & 4 deletions Microsoft.Toolkit.Graph/Microsoft.Toolkit.Graph.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="MSBuild.Sdk.Extras">

<PropertyGroup>
<TargetFrameworks>uap10.0.16299;netstandard2.0</TargetFrameworks>
<TargetFrameworks>uap10.0.17763;netstandard2.0</TargetFrameworks>
<Title>Windows Community Toolkit .NET Standard Graph Services</Title>
<Description>
This package includes .NET Standard code helpers such as:
Expand All @@ -16,13 +16,13 @@
<Platforms>AnyCPU;ARM;ARM64;x64;x86</Platforms>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0.16299'">
<PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0.17763'">
<DefineConstants Condition="'$(DisableImplicitFrameworkDefines)' != 'true'">$(DefineConstants);WINRT</DefineConstants>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Graph.Beta" Version="0.21.0-preview" />
<PackageReference Include="Microsoft.Graph.Beta" Version="0.32.0-preview" />
<PackageReference Include="Microsoft.Graph.Auth" Version="1.0.0-preview.5" />
<PackageReference Include="Microsoft.Toolkit" Version="7.0.0-preview2" />
<PackageReference Include="Microsoft.Toolkit" Version="7.0.0-preview4" />
</ItemGroup>
</Project>
3 changes: 0 additions & 3 deletions Microsoft.Toolkit.Graph/Providers/ProviderManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@

using System;
using System.ComponentModel;
using Microsoft.Graph;
using Microsoft.Identity.Client;
using Microsoft.Toolkit.Helpers;

namespace Microsoft.Toolkit.Graph.Providers
{
Expand Down
Loading

0 comments on commit c10f2aa

Please sign in to comment.