Skip to content

Commit d1bc41e

Browse files
Merge branch 'master' into feature/mvvm-toolkit-preview5
2 parents 126a15c + 99f4581 commit d1bc41e

File tree

405 files changed

+3105
-1073
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

405 files changed

+3105
-1073
lines changed

Microsoft.Toolkit.Uwp.SampleApp/Microsoft.Toolkit.Uwp.SampleApp.csproj

Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@
112112
<PackageReference Include="Microsoft.Services.Store.Engagement">
113113
<Version>10.1901.28001</Version>
114114
</PackageReference>
115+
<!-- TODO Reintroduce graph controls
116+
<PackageReference Include="Microsoft.Toolkit.Graph.Controls">
117+
<Version>6.1.0-build.6</Version>
118+
</PackageReference>
119+
-->
115120
<PackageReference Include="Microsoft.UI.Xaml">
116121
<Version>2.4.2</Version>
117122
</PackageReference>
@@ -279,8 +284,10 @@
279284
<Content Include="SamplePages\RemoteDeviceHelper\RemoteDeviceHelper.png" />
280285
<Content Include="SamplePages\ImageCropper\ImageCropper.png" />
281286
<Content Include="SamplePages\StaggeredLayout\StaggeredLayout.png" />
287+
<!-- TODO Reintroduce graph controls
282288
<Content Include="SamplePages\PeoplePicker\PeoplePicker.png" />
283289
<Content Include="SamplePages\PersonView\PersonView.png" />
290+
-->
284291
<Content Include="SamplePages\TokenizingTextBox\TokenizingTextBox.png" />
285292
<Content Include="SamplePages\UniformGrid\UniformGrid.png" />
286293
<Content Include="SamplePages\AdaptiveGridView\AdaptiveGridView.png" />
@@ -298,7 +305,9 @@
298305
<Content Include="SamplePages\DataGrid\DataGrid.png" />
299306
<Content Include="SamplePages\DispatcherQueueHelper\DispatchQueueHelper.png" />
300307
<Content Include="SamplePages\DockPanel\DockPanel.png" />
308+
<!-- TODO Reintroduce graph controls
301309
<Content Include="SamplePages\LoginButton\LoginButton.png" />
310+
-->
302311
<Content Include="SamplePages\FadeHeader\FadeHeaderBehavior.png" />
303312
<Content Include="SamplePages\FocusTracker\FocusTracker.png" />
304313
<Content Include="SamplePages\BladeView\BladeView.png" />
@@ -326,8 +335,8 @@
326335
<Content Include="SamplePages\LiveTile\LiveTile.png" />
327336
<Content Include="SamplePages\MarkdownTextBlock\MarkdownTextBlock.png" />
328337
<Content Include="SamplePages\Loading\Loading.png" />
329-
<Content Include="SamplePages\MasterDetailsView\MasterDetailsView.png" />
330-
<Content Include="SamplePages\MasterDetailsView\OneDriveLogo.png" />
338+
<Content Include="SamplePages\ListDetailsView\ListDetailsView.png" />
339+
<Content Include="SamplePages\ListDetailsView\OneDriveLogo.png" />
331340
<Content Include="SamplePages\Menu\Menu.png" />
332341
<Content Include="SamplePages\Microsoft Translator Service\TranslatorService.png" />
333342
<Content Include="SamplePages\NetworkHelper\NetworkHelper.png" />
@@ -396,7 +405,7 @@
396405
<Content Include="SamplePages\DropShadowPanel\DropShadowPanelXaml.bind" />
397406
<Content Include="SamplePages\Object Storage\ObjectStorageCode.bind" />
398407
<Content Include="SamplePages\BackgroundTaskHelper\BackgroundTaskHelperCode.bind" />
399-
<Content Include="SamplePages\MasterDetailsView\MasterDetailsView.bind" />
408+
<Content Include="SamplePages\ListDetailsView\ListDetailsView.bind" />
400409
<Content Include="SamplePages\NetworkHelper\NetworkHelperCode.bind" />
401410
<Content Include="SamplePages\PrintHelper\PrintHelperCode.bind" />
402411
<Content Include="SamplePages\SystemInformation\SystemInformationCode.bind" />
@@ -411,7 +420,7 @@
411420
<SubType>Designer</SubType>
412421
</Content>
413422
<Content Include="SamplePages\WrapPanel\WrapPanel.bind" />
414-
<Content Include="SamplePages\MasterDetailsView\MasterDetailsViewCode.bind" />
423+
<Content Include="SamplePages\ListDetailsView\ListDetailsViewCode.bind" />
415424
<Content Include="SamplePages\Microsoft Translator Service\MicrosoftTranslatorCode.bind" />
416425
<Content Include="SamplePages\MarkdownTextBlock\MarkdownTextBlock.bind" />
417426
<Content Include="SamplePages\MarkdownTextBlock\InitialContent.md" />
@@ -470,9 +479,11 @@
470479
<SubType>Designer</SubType>
471480
</Content>
472481
<Content Include="SamplePages\CameraPreview\CameraPreviewXaml.bind" />
482+
<!-- TODO Reintroduce graph controls
473483
<Content Include="SamplePages\LoginButton\LoginButtonXaml.bind" />
474484
<Content Include="SamplePages\PeoplePicker\PeoplePickerXaml.bind" />
475485
<Content Include="SamplePages\PersonView\PersonViewXaml.bind" />
486+
-->
476487
<Content Include="SamplePages\GazeInteraction\GazeInteractionXaml.bind">
477488
<SubType>Designer</SubType>
478489
</Content>
@@ -654,12 +665,14 @@
654665
<Compile Include="Pages\SampleController.xaml.cs">
655666
<DependentUpon>SampleController.xaml</DependentUpon>
656667
</Compile>
668+
<!-- TODO Reintroduce graph controls
657669
<Compile Include="SamplePages\PeoplePicker\PeoplePickerPage.xaml.cs">
658670
<DependentUpon>PeoplePickerPage.xaml</DependentUpon>
659671
</Compile>
660672
<Compile Include="SamplePages\PersonView\PersonViewPage.xaml.cs">
661673
<DependentUpon>PersonViewPage.xaml</DependentUpon>
662674
</Compile>
675+
-->
663676
<Compile Include="SamplePages\AdvancedCollectionView\AdvancedCollectionViewPage.xaml.cs">
664677
<DependentUpon>AdvancedCollectionViewPage.xaml</DependentUpon>
665678
</Compile>
@@ -700,9 +713,11 @@
700713
<Compile Include="SamplePages\BackdropBlurBrush\BackdropBlurBrushPage.xaml.cs">
701714
<DependentUpon>BackdropBlurBrushPage.xaml</DependentUpon>
702715
</Compile>
716+
<!-- TODO Reintroduce graph controls
703717
<Compile Include="SamplePages\LoginButton\LoginButtonPage.xaml.cs">
704718
<DependentUpon>LoginButtonPage.xaml</DependentUpon>
705719
</Compile>
720+
-->
706721
<Compile Include="SamplePages\DataGrid\DataGridPage.xaml.cs">
707722
<DependentUpon>DataGridPage.xaml</DependentUpon>
708723
</Compile>
@@ -851,8 +866,8 @@
851866
<Compile Include="SamplePages\Loading\LoadingPage.xaml.cs">
852867
<DependentUpon>LoadingPage.xaml</DependentUpon>
853868
</Compile>
854-
<Compile Include="SamplePages\MasterDetailsView\MasterDetailsViewPage.xaml.cs">
855-
<DependentUpon>MasterDetailsViewPage.xaml</DependentUpon>
869+
<Compile Include="SamplePages\ListDetailsView\ListDetailsViewPage.cs">
870+
<DependentUpon>ListDetailsViewPage.xaml</DependentUpon>
856871
</Compile>
857872
<Compile Include="SamplePages\ImageCache\ImageCachePage.xaml.cs">
858873
<DependentUpon>ImageCachePage.xaml</DependentUpon>
@@ -1039,6 +1054,7 @@
10391054
<SubType>Designer</SubType>
10401055
<Generator>MSBuild:Compile</Generator>
10411056
</Page>
1057+
<!-- TODO Reintroduce graph controls
10421058
<Page Include="SamplePages\PeoplePicker\PeoplePickerPage.xaml">
10431059
<Generator>MSBuild:Compile</Generator>
10441060
<SubType>Designer</SubType>
@@ -1047,6 +1063,7 @@
10471063
<Generator>MSBuild:Compile</Generator>
10481064
<SubType>Designer</SubType>
10491065
</Page>
1066+
-->
10501067
<Page Include="SamplePages\BackdropGammaTransferBrush\BackdropGammaTransferBrushPage.xaml">
10511068
<Generator>MSBuild:Compile</Generator>
10521069
<SubType>Designer</SubType>
@@ -1131,10 +1148,12 @@
11311148
<Generator>MSBuild:Compile</Generator>
11321149
<SubType>Designer</SubType>
11331150
</Page>
1151+
<!-- TODO Reintroduce graph controls
11341152
<Page Include="SamplePages\LoginButton\LoginButtonPage.xaml">
11351153
<Generator>MSBuild:Compile</Generator>
11361154
<SubType>Designer</SubType>
11371155
</Page>
1156+
-->
11381157
<Page Include="SamplePages\FocusTracker\FocusTrackerPage.xaml">
11391158
<Generator>MSBuild:Compile</Generator>
11401159
<SubType>Designer</SubType>
@@ -1299,7 +1318,7 @@
12991318
<Generator>MSBuild:Compile</Generator>
13001319
<SubType>Designer</SubType>
13011320
</Page>
1302-
<Page Include="SamplePages\MasterDetailsView\MasterDetailsViewPage.xaml">
1321+
<Page Include="SamplePages\ListDetailsView\ListDetailsViewPage.xaml">
13031322
<SubType>Designer</SubType>
13041323
<Generator>MSBuild:Compile</Generator>
13051324
</Page>
@@ -1457,6 +1476,10 @@
14571476
<Project>{daeb9cec-c817-33b2-74b2-bc379380db72}</Project>
14581477
<Name>Microsoft.Toolkit.Uwp.UI.Controls.DataGrid</Name>
14591478
</ProjectReference>
1479+
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.UI.Controls.Input\Microsoft.Toolkit.Uwp.UI.Controls.Input.csproj">
1480+
<Project>{af1be4e9-e2e1-4729-b076-b3725d8e21ee}</Project>
1481+
<Name>Microsoft.Toolkit.Uwp.UI.Controls.Input</Name>
1482+
</ProjectReference>
14601483
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.UI.Controls.Layout\Microsoft.Toolkit.Uwp.UI.Controls.Layout.csproj">
14611484
<Project>{cb444381-18ba-4a51-bb32-3a498bcc1e99}</Project>
14621485
<Name>Microsoft.Toolkit.Uwp.UI.Controls.Layout</Name>
@@ -1465,9 +1488,17 @@
14651488
<Project>{6fedf199-b052-49dd-8f3e-2a9224998e0f}</Project>
14661489
<Name>Microsoft.Toolkit.Uwp.UI.Controls.Markdown</Name>
14671490
</ProjectReference>
1468-
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.UI.Controls\Microsoft.Toolkit.Uwp.UI.Controls.csproj">
1491+
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.UI.Controls.Media\Microsoft.Toolkit.Uwp.UI.Controls.Media.csproj">
1492+
<Project>{43bd2a36-9e12-4788-80ae-2377e41e6d05}</Project>
1493+
<Name>Microsoft.Toolkit.Uwp.UI.Controls.Media</Name>
1494+
</ProjectReference>
1495+
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.UI.Controls.Primitives\Microsoft.Toolkit.Uwp.UI.Controls.Primitives.csproj">
1496+
<Project>{84ab7dc5-95c9-4cf8-a370-d077e9e9ef1a}</Project>
1497+
<Name>Microsoft.Toolkit.Uwp.UI.Controls.Primitives</Name>
1498+
</ProjectReference>
1499+
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.UI.Controls.Core\Microsoft.Toolkit.Uwp.UI.Controls.Core.csproj">
14691500
<Project>{e9faabfb-d726-42c1-83c1-cb46a29fea81}</Project>
1470-
<Name>Microsoft.Toolkit.Uwp.UI.Controls</Name>
1501+
<Name>Microsoft.Toolkit.Uwp.UI.Controls.Core</Name>
14711502
</ProjectReference>
14721503
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.UI.Media\Microsoft.Toolkit.Uwp.UI.Media.csproj">
14731504
<Project>{75f9ee44-3efa-47bc-aedd-351b9834a0af}</Project>

Microsoft.Toolkit.Uwp.SampleApp/Models/Sample.cs

Lines changed: 23 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
using System.Text.Json.Serialization;
1717
using System.Text.RegularExpressions;
1818
using System.Threading.Tasks;
19+
// TODO Reintroduce graph controls
20+
// using Microsoft.Toolkit.Graph.Converters;
21+
// using Microsoft.Toolkit.Graph.Providers;
1922
using Microsoft.Toolkit.Uwp.Helpers;
2023
using Microsoft.Toolkit.Uwp.Input.GazeInteraction;
2124
using Microsoft.Toolkit.Uwp.SampleApp.Models;
@@ -626,107 +629,30 @@ public async Task PreparePropertyDescriptorAsync()
626629
private static Type LookForTypeByName(string typeName)
627630
{
628631
// First search locally
629-
var result = System.Type.GetType(typeName);
630-
631-
if (result != null)
632+
if (System.Type.GetType(typeName) is Type systemType)
632633
{
633-
return result;
634+
return systemType;
634635
}
635636

636-
// Search in Windows
637-
var proxyType = VerticalAlignment.Center;
638-
var assembly = proxyType.GetType().GetTypeInfo().Assembly;
639-
640-
foreach (var typeInfo in assembly.ExportedTypes)
637+
var targets = new Type[]
641638
{
642-
if (typeInfo.Name == typeName)
643-
{
644-
return typeInfo;
645-
}
646-
}
647-
648-
// Search in Microsoft.Toolkit.Uwp.UI.Controls
649-
var controlsProxyType = GridSplitter.GridResizeDirection.Auto;
650-
assembly = controlsProxyType.GetType().GetTypeInfo().Assembly;
651-
652-
foreach (var typeInfo in assembly.ExportedTypes)
653-
{
654-
if (typeInfo.Name == typeName)
655-
{
656-
return typeInfo;
657-
}
658-
}
659-
660-
// Search in Microsoft.Toolkit.Graph.Controls
661-
//var graphControlsProxyType = typeof(UserToPersonConverter);
662-
//assembly = graphControlsProxyType.GetTypeInfo().Assembly;
663-
664-
//foreach (var typeInfo in assembly.ExportedTypes)
665-
//{
666-
// if (typeInfo.Name == typeName)
667-
// {
668-
// return typeInfo;
669-
// }
670-
//}
671-
672-
// Search in Microsoft.Toolkit.Uwp.UI.Animations
673-
var animationsProxyType = EasingType.Default;
674-
assembly = animationsProxyType.GetType().GetTypeInfo().Assembly;
675-
foreach (var typeInfo in assembly.ExportedTypes)
676-
{
677-
if (typeInfo.Name == typeName)
678-
{
679-
return typeInfo;
680-
}
681-
}
682-
683-
// Search in Microsoft.Toolkit.Uwp.UI
684-
var uiProxyType = ImageBlendMode.Multiply;
685-
assembly = uiProxyType.GetType().GetTypeInfo().Assembly;
686-
foreach (var typeInfo in assembly.ExportedTypes)
687-
{
688-
if (typeInfo.Name == typeName)
689-
{
690-
return typeInfo;
691-
}
692-
}
693-
694-
// Search in Microsoft.Toolkit.Uwp.Input.GazeInteraction
695-
var gazeType = Interaction.Enabled;
696-
assembly = gazeType.GetType().GetTypeInfo().Assembly;
697-
foreach (var typeInfo in assembly.ExportedTypes)
698-
{
699-
if (typeInfo.Name == typeName)
700-
{
701-
return typeInfo;
702-
}
703-
}
704-
705-
// Search in Microsoft.Toolkit.Uwp.UI.Controls.DataGrid
706-
var dataGridProxyType = DataGridGridLinesVisibility.None;
707-
assembly = dataGridProxyType.GetType().GetTypeInfo().Assembly;
708-
709-
foreach (var typeInfo in assembly.ExportedTypes)
710-
{
711-
if (typeInfo.Name == typeName)
712-
{
713-
return typeInfo;
714-
}
715-
}
716-
717-
// Search in Microsoft.Toolkit.Uwp.UI.Controls.Markdown
718-
var markdownTextBlockType = typeof(MarkdownTextBlock);
719-
assembly = markdownTextBlockType.GetTypeInfo().Assembly;
720-
721-
foreach (var typeInfo in assembly.ExportedTypes)
722-
{
723-
if (typeInfo.Name == typeName)
724-
{
725-
return typeInfo;
726-
}
727-
}
728-
729-
return null;
639+
VerticalAlignment.Center.GetType(), // Windows
640+
StackMode.Replace.GetType(), // Microsoft.Toolkit.Uwp.UI.Controls.Core
641+
642+
// TODO Reintroduce graph controls
643+
// typeof(UserToPersonConverter)) // Search in Microsoft.Toolkit.Graph.Controls
644+
EasingType.Default.GetType(), // Microsoft.Toolkit.Uwp.UI.Animations
645+
ImageBlendMode.Multiply.GetType(), // Search in Microsoft.Toolkit.Uwp.UI
646+
Interaction.Enabled.GetType(), // Microsoft.Toolkit.Uwp.Input.GazeInteraction
647+
DataGridGridLinesVisibility.None.GetType(), // Microsoft.Toolkit.Uwp.UI.Controls.DataGrid
648+
GridSplitter.GridResizeDirection.Auto.GetType(), // Microsoft.Toolkit.Uwp.UI.Controls.Layout
649+
typeof(MarkdownTextBlock), // Microsoft.Toolkit.Uwp.UI.Controls.Markdown
650+
BitmapFileFormat.Bmp.GetType(), // Microsoft.Toolkit.Uwp.UI.Controls.Media
651+
StretchChild.Last.GetType() // Microsoft.Toolkit.Uwp.UI.Controls.Primitivs
652+
};
653+
654+
return targets.SelectMany(t => t.Assembly.ExportedTypes)
655+
.FirstOrDefault(t => t.Name == typeName);
730656
}
731657

732658
private static async Task<string> GetDocsSHA()

Microsoft.Toolkit.Uwp.SampleApp/SamplePages/InAppNotification/InAppNotificationXaml.bind

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
<Page.Resources>
1313
<ResourceDictionary>
1414
<ResourceDictionary.MergedDictionaries>
15-
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification/Styles/MSEdgeNotificationStyle.xaml" />
16-
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification/Styles/VSCodeNotificationStyle.xaml" />
15+
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls.Core/InAppNotification/Styles/MSEdgeNotificationStyle.xaml" />
16+
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls.Core/InAppNotification/Styles/VSCodeNotificationStyle.xaml" />
1717
</ResourceDictionary.MergedDictionaries>
1818

1919
<local:DismissCommand x:Key="DismissCommand" />

Microsoft.Toolkit.Uwp.SampleApp/SamplePages/MasterDetailsView/MasterDetailsView.bind renamed to Microsoft.Toolkit.Uwp.SampleApp/SamplePages/ListDetailsView/ListDetailsView.bind

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
mc:Ignorable="d">
99

1010
<Grid>
11-
<controls:MasterDetailsView BackButtonBehavior="Automatic"
11+
<controls:ListDetailsView BackButtonBehavior="Automatic"
1212
ItemsSource="{Binding Emails}"
1313
NoSelectionContent="Select an item to view"
1414
CompactModeThresholdWidth="720">
15-
<controls:MasterDetailsView.ItemTemplate>
15+
<controls:ListDetailsView.ItemTemplate>
1616
<DataTemplate>
1717
<StackPanel Margin="0,8">
1818
<TextBlock Text="{Binding From}"
@@ -27,8 +27,8 @@
2727
MaxLines="1"/>
2828
</StackPanel>
2929
</DataTemplate>
30-
</controls:MasterDetailsView.ItemTemplate>
31-
<controls:MasterDetailsView.DetailsTemplate>
30+
</controls:ListDetailsView.ItemTemplate>
31+
<controls:ListDetailsView.DetailsTemplate>
3232
<DataTemplate>
3333
<RelativePanel Margin="24">
3434
<controls:ImageEx x:Name="FromEllipse"
@@ -53,8 +53,8 @@
5353
Margin="0,12,0,0"/>
5454
</RelativePanel>
5555
</DataTemplate>
56-
</controls:MasterDetailsView.DetailsTemplate>
57-
<controls:MasterDetailsView.NoSelectionContentTemplate>
56+
</controls:ListDetailsView.DetailsTemplate>
57+
<controls:ListDetailsView.NoSelectionContentTemplate>
5858
<DataTemplate>
5959
<StackPanel HorizontalAlignment="Center"
6060
VerticalAlignment="Center">
@@ -71,8 +71,8 @@
7171
Margin="0,12"/>
7272
</StackPanel>
7373
</DataTemplate>
74-
</controls:MasterDetailsView.NoSelectionContentTemplate>
75-
<controls:MasterDetailsView.MasterCommandBar>
74+
</controls:ListDetailsView.NoSelectionContentTemplate>
75+
<controls:ListDetailsView.ListCommandBar>
7676
<CommandBar>
7777
<AppBarButton Icon="Back" Label="Back"/>
7878
<AppBarButton Icon="Forward" Label="Forward"/>
@@ -84,14 +84,14 @@
8484
</TextBlock>
8585
</CommandBar.Content>
8686
</CommandBar>
87-
</controls:MasterDetailsView.MasterCommandBar>
88-
<controls:MasterDetailsView.DetailsCommandBar>
87+
</controls:ListDetailsView.ListCommandBar>
88+
<controls:ListDetailsView.DetailsCommandBar>
8989
<CommandBar>
9090
<AppBarButton Icon="MailReply" Label="Reply" />
9191
<AppBarButton Icon="MailReplyAll" Label="Reply All" />
9292
<AppBarButton Icon="MailForward" Label="Forward" />
9393
</CommandBar>
94-
</controls:MasterDetailsView.DetailsCommandBar>
95-
</controls:MasterDetailsView>
94+
</controls:ListDetailsView.DetailsCommandBar>
95+
</controls:ListDetailsView>
9696
</Grid>
9797
</Page>

0 commit comments

Comments
 (0)