Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphPresenter doesn't work in a UWP app inside a Uno project #61

Open
1 task
qmatteoq opened this issue Nov 4, 2020 · 2 comments
Open
1 task

GraphPresenter doesn't work in a UWP app inside a Uno project #61

qmatteoq opened this issue Nov 4, 2020 · 2 comments
Labels
Area: Controls bug 🐛 Something isn't working Controls: GraphPresenter question ❔ Further information is requested

Comments

@qmatteoq
Copy link

qmatteoq commented Nov 4, 2020

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:

  1. Create a new Uno solution
  2. Add the Microsoft.Toolkit.Graph.Controls NuGet to the UWP project
  3. 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>

  1. 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:

image

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

image

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.

@qmatteoq qmatteoq added the bug 🐛 Something isn't working label Nov 4, 2020
@ghost ghost added the needs triage 🔍 label Nov 4, 2020
@ghost
Copy link

ghost commented Nov 4, 2020

Hello qmatteoq, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

@michael-hawker
Copy link
Member

Thanks @qmatteoq, there's an Uno fork repo here, but we need to update it to the latest code in here still. We haven't tested consuming the Microsoft.Toolkit.Graph.Controls package directly for Uno.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Controls bug 🐛 Something isn't working Controls: GraphPresenter question ❔ Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants