GraphPresenter doesn't work in a UWP app inside a Uno project
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Bắt đầu với MainPage.xaml của dự án dùng chung và tái hiện sự cố trong ứng dụng UWP bên trong một solution Uno mới bằng Microsoft.Toolkit.Graph.Controls 7.0.0-preview2. So sánh với kết quả UWP độc lập và truy tìm lý do GraphPresenter trống; hoàn thành khi GraphPresenter hiển thị danh sách thư như hành vi mong đợi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
The GraphPresenter control works fine when it's executed in a standalone UWP app, but it doesn't render when the same UWP app is part of an Uno-based solution.
- Is this bug a regression in the toolkit? If so, what toolkit version did you last see it work:
Steps to Reproduce
Steps to reproduce the behavior:
- Create a new Uno solution
- Add the Microsoft.Toolkit.Graph.Controls NuGet to the UWP project
- Add the following XAML to the MainPage.xaml file in the shared project:
<Page
x:Class="App13.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App13"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:toolkit="using:Microsoft.Toolkit.Graph.Controls"
xmlns:Interactivity="using:Microsoft.Xaml.Interactivity"
xmlns:providers="using:Microsoft.Toolkit.Graph.Providers"
xmlns:graph="using:Microsoft.Graph"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Interactivity:Interaction.Behaviors>
<providers:MockProviderBehavior />
</Interactivity:Interaction.Behaviors>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<toolkit:LoginButton Grid.Row="0" />
<toolkit:GraphPresenter
Grid.Row="1"
RequestBuilder="{x:Bind providers:ProviderManager.Instance.GlobalProvider.Graph.Me.Messages, Mode=OneWay}"
ResponseType="graph:Message"
IsCollection="True">
<toolkit:GraphPresenter.ContentTemplate>
<DataTemplate>
<ScrollViewer HorizontalScrollMode="Disabled" VerticalScrollBarVisibility="Auto">
<ItemsControl ItemsSource="{Binding}">
<ItemsControl.ItemTemplate>
<DataTemplate x:DataType="graph:Message">
<StackPanel>
<toolkit:PersonView PersonQuery="{x:Bind Sender.EmailAddress.Address}" ShowName="True" Margin="-4"/>
<TextBlock Text="{x:Bind Subject}" Style="{StaticResource BaseTextBlockStyle}" Padding="0"/>
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
<ItemsControl.ItemContainerStyle>
<Style TargetType="ContentPresenter">
<Setter Property="Margin" Value="0,8,0,8"/>
</Style>
</ItemsControl.ItemContainerStyle>
</ItemsControl>
</ScrollViewer>
</DataTemplate>
</toolkit:GraphPresenter.ContentTemplate>
</toolkit:GraphPresenter>
</Grid>
</Page>
- Run the UWP app
Expected behavior
A list of mail, presented through the GraphPresenter control, is displayed in the main page. The control, instead, is empty.
The same exact XAML code in a standalone UWP app (not part of an Uno solution) works fine.
Screenshots
This is the output of the UWP app included in the Uno solution:

This is the output, instead, of a standalone UWP app:

Environment
NuGet Package(s): Microsoft.Toolkit.Graph.Controls
Package Version(s): 7.0.0-preview2
Windows 10 Build Number:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [ ] May 2019 Update (18362)
- [x] October 2020 Update (19042)
- [ ] Insider Build (build number: )
App min and target version:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [ ] May 2019 Update (18362)
- [x] October 2020 Update (19042)
- [ ] Insider Build (xxxxx)
Device form factor:
- [x] Desktop
- [ ] Xbox
- [ ] Surface Hub
- [ ] IoT
Visual Studio
- [ ] 2017 (version: )
- [x] 2019 (version: 16.7.7 )
- [ ] 2019 Preview (version: )
Additional context
Add any other context about the problem here.
- Ngôn ngữ chính
- C#
- Star
- 156
- Fork
- 37
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của CommunityToolkit/Graph-Controls
-
bug :bug:
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
CommunityToolkit/Graph-Controls#211 · 3 bình luận ·
-
CommunityToolkit.Authentication.Msal use Microsoft Graph V4 but if you install V5,you cannot releaseĐang mởbug :bug: needs attention :wave: needs triage :mag:
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
CommunityToolkit/Graph-Controls#208 · 20 bình luận ·
-
enhancement :sparkles:
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
-
Area: Providers
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
CommunityToolkit/Graph-Controls#195 · 1 bình luận ·
-
Area: Providers bug :bug:
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
CommunityToolkit/Graph-Controls#189 · 3 bình luận ·
Tất cả issue của CommunityToolkit/Graph-Controls
Issue tương tự
-
[Core] IPlatformServices.PrefersDarkTheme: the desktop's theme as the signed-in user sees itĐang mởarea: core bug help wanted ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
ZaidX88/sluice#265 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: remote bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Install a C# EnvironmentĐang mở📅 Sprint 4 Module-Tools Setup Submit:None 🦔 Size Tiny
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
CodeYourFuture/Module-Tools#712 ·
-
A: Mapping P3: Standard T: New Feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
space-wizards/space-station-14#46878 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 60/100
CommunityToolkit/Windows#896 · 2 bình luận ·