forked from CommunityToolkit/Graph-Controls
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainPage.xaml
43 lines (40 loc) · 2.19 KB
/
MainPage.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<Page
x:Class="SampleTest.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:SampleTest"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:wgt="using:Microsoft.Toolkit.Graph.Controls"
xmlns:graph="using:Microsoft.Graph"
xmlns:Interactivity="using:Microsoft.Xaml.Interactivity"
xmlns:providers="using:Microsoft.Toolkit.Graph.Providers"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"><!-- Workaround for https://github.com/microsoft/microsoft-ui-xaml/issues/1286 -->
<!--
Initialize Graph Provider On Page Load
Register Client Id: https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app
After finishing the initial registration page, you will also need to add an additional redirect URI.
Click on "Add a Redirect URI" and check the https://login.microsoftonline.com/common/oauth2/nativeclient checkbox on that page. Then click "Save".
-->
<Interactivity:Interaction.Behaviors>
<!--<providers:InteractiveProviderBehavior ClientId="YOUR_CLIENT_ID_HERE" Scopes="User.Read,User.ReadBasic.All,People.Read,Calendars.Read"/>-->
<providers:MockProviderBehavior/>
</Interactivity:Interaction.Behaviors>
<Grid>
<wgt:LoginButton VerticalAlignment="Top" HorizontalAlignment="Right"/>
<StackPanel Margin="16,48">
<wgt:PeoplePicker x:Name="PeopleChooser"/>
<TextBlock Margin="0,8,0,0" FontWeight="Bold">Picked People:</TextBlock>
<ItemsControl ItemsSource="{x:Bind PeopleChooser.ItemsSource}"
Margin="8,0,0,0">
<ItemsControl.ItemTemplate>
<DataTemplate x:DataType="graph:Person">
<TextBlock Text="{x:Bind DisplayName}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</Grid>
</Page>