Skip to content

Commit

Permalink
Syncing content from committish 7928203d1a719a862e7458bfc51f51ffac975e29
Browse files Browse the repository at this point in the history
  • Loading branch information
reunion-maestro-bot committed Jul 23, 2024
1 parent 67723ef commit 90b45c6
Show file tree
Hide file tree
Showing 573 changed files with 4,562 additions and 2,481 deletions.
9 changes: 9 additions & 0 deletions src/MergedWinMD/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
</PropertyGroup>

<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />

<PropertyGroup>
<NuGetPackageRoot Condition="'$(NuGetPackageRoot)' == ''">$(MSBuildThisFileDirectory)..\packages</NuGetPackageRoot>

<!--Causes loading of winrt dependencies from CoreWebView2 SDK package - required for any usage from WinUI3/WinAppSDK.
Note end-user WASDK apps get this implicitly via $(MicrosoftWindowsAppSDKPackageDir). -->
<WebView2UseWinRT>true</WebView2UseWinRT>
</PropertyGroup>
<Import Project="$(NuGetPackageRoot)\Microsoft.Web.WebView2.$(WebView2Version)\build\native\Microsoft.Web.WebView2.targets" Condition="Exists('$(NuGetPackageRoot)\Microsoft.Web.WebView2.$(WebView2Version)\build\native\Microsoft.Web.WebView2.targets')" />

<PropertyGroup Label="Globals">
<XamlMSBuildAutoGenerate>false</XamlMSBuildAutoGenerate>
Expand Down
2 changes: 1 addition & 1 deletion src/Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<PackageReference Update="MUXCustomBuildTasks" Version="$(MuxCustomBuildTasksPackageVersion)" />
<PackageReference Update="Microsoft.Taef" Version="$(TaefNugetPackageVersion)" />
<PackageReference Update="ColorCode.Core" Version="$(ColorCodeVersion)" />
<PackageReference Update="CommunityToolkit.WinUI.Controls.Segmented" Version="$(CommunityToolkitWinUIVersion)" />
<PackageReference Update="CommunityToolkit.WinUI.Controls.Segmented" Version="$(CommunityToolkitWinUIVersion)" />
<PackageReference Update="CommunityToolkit.WinUI.Controls.SettingsControls" Version="$(CommunityToolkitWinUIVersion)" />
<PackageReference Update="CommunityToolkit.WinUI.Converters" Version="$(CommunityToolkitWinUIVersion)" />
<PackageReference Update="CommunityToolkit.WinUI.Animations" Version="$(CommunityToolkitWinUIVersion)" />
Expand Down
8 changes: 4 additions & 4 deletions src/controls/dev/CommonStyles/Hyperlink_themeresources.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<StaticResource x:Key="HyperlinkForegroundPressed" ResourceKey="AccentTextFillColorTertiaryBrush" />
</ResourceDictionary>
<ResourceDictionary x:Key="HighContrast">
<SolidColorBrush x:Key="HyperlinkForeground" Color="{StaticResource SystemColorHotlightColor}" />
<SolidColorBrush x:Key="HyperlinkForegroundPointerOver" Color="{StaticResource SystemColorWindowTextColor}" />
<SolidColorBrush x:Key="HyperlinkForegroundPressed" Color="{StaticResource SystemColorHighlightColor}" />
<StaticResource x:Key="HyperlinkForeground" ResourceKey="SystemControlHyperlinkTextBrush" />
<StaticResource x:Key="HyperlinkForegroundPointerOver" ResourceKey="SystemControlPageTextBaseMediumBrush" />
<StaticResource x:Key="HyperlinkForegroundPressed" ResourceKey="SystemControlHighlightBaseMediumLowBrush" />
</ResourceDictionary>
<ResourceDictionary x:Key="Light">
<StaticResource x:Key="HyperlinkForeground" ResourceKey="AccentTextFillColorPrimaryBrush" />
Expand All @@ -18,4 +18,4 @@
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
<x:Boolean x:Key="HyperlinkUnderlineVisible">False</x:Boolean>
</ResourceDictionary>
</ResourceDictionary>
70 changes: 35 additions & 35 deletions src/controls/dev/CommonStyles/TestUI/FlatItemsControlPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace MUXControlsTestApp
{
public sealed partial class FlatItemsControlPage : TestPage
{
private ObservableCollection<Recipe> _colRecipes = null;
private ObservableCollection<Entity> _colEntities = null;
private ItemsPanelTemplate _modernPanelTemplate = null;
private DataTemplate[] _itemTemplates = new DataTemplate[3];

Expand All @@ -31,13 +31,13 @@ public FlatItemsControlPage()

private void FlatItemsControlPage_Loaded(object sender, RoutedEventArgs e)
{
_colRecipes = new ObservableCollection<Recipe>();
_colEntities = new ObservableCollection<Entity>();

for (int itemIndex = 0; itemIndex < 250; itemIndex++)
{
BitmapImage bitmapImage = GetBitmapImage(itemIndex % 126 + 1);

_colRecipes.Add(new Recipe()
_colEntities.Add(new Entity()
{
BitmapImage = bitmapImage,
Id = itemIndex
Expand All @@ -50,7 +50,7 @@ private void FlatItemsControlPage_Loaded(object sender, RoutedEventArgs e)
UpdateItemsControlXYFocusKeyboardNavigation();
UpdateItemsPanelType();

itemsControl.ItemsSource = _colRecipes;
itemsControl.ItemsSource = _colEntities;
}

private void UpdateItemsPanelType()
Expand Down Expand Up @@ -260,9 +260,9 @@ private void UpdateDataSourceItemCount()
{
txtDataSourceItemCount.Text = "0";
}
else if (itemsControl.ItemsSource == _colRecipes)
else if (itemsControl.ItemsSource == _colEntities)
{
txtDataSourceItemCount.Text = _colRecipes.Count.ToString();
txtDataSourceItemCount.Text = _colEntities.Count.ToString();
}
}
}
Expand All @@ -283,17 +283,17 @@ private void DataSourceAddItem()
{
if (itemsControl != null && itemsControl.ItemsSource != null)
{
if (itemsControl.ItemsSource == _colRecipes)
if (itemsControl.ItemsSource == _colEntities)
{
BitmapImage bitmapImage = GetBitmapImage(_colRecipes.Count % 126 + 1);
BitmapImage bitmapImage = GetBitmapImage(_colEntities.Count % 126 + 1);

var recipe = new Recipe()
var entity = new Entity()
{
BitmapImage = bitmapImage,
Id = _colRecipes.Count
Id = _colEntities.Count
};

_colRecipes.Add(recipe);
_colEntities.Add(entity);
}
}
}
Expand All @@ -310,17 +310,17 @@ private void DataSourceInsertItem(int newItemIndex)
{
if (itemsControl != null && itemsControl.ItemsSource != null)
{
if (itemsControl.ItemsSource == _colRecipes)
if (itemsControl.ItemsSource == _colEntities)
{
BitmapImage bitmapImage = GetBitmapImage(_colRecipes.Count % 126 + 1);
BitmapImage bitmapImage = GetBitmapImage(_colEntities.Count % 126 + 1);

var recipe = new Recipe()
var entity = new Entity()
{
BitmapImage = bitmapImage,
Id = _colRecipes.Count
Id = _colEntities.Count
};

_colRecipes.Insert(newItemIndex, recipe);
_colEntities.Insert(newItemIndex, entity);
}
}
}
Expand All @@ -337,9 +337,9 @@ private void DataSourceRemoveAllItems()
{
if (itemsControl != null && itemsControl.ItemsSource != null)
{
if (itemsControl.ItemsSource == _colRecipes)
if (itemsControl.ItemsSource == _colEntities)
{
_colRecipes.Clear();
_colEntities.Clear();
}
}
}
Expand All @@ -356,9 +356,9 @@ private void DataSourceRemoveItem(int oldItemIndex)
{
if (itemsControl != null && itemsControl.ItemsSource != null)
{
if (itemsControl.ItemsSource == _colRecipes)
if (itemsControl.ItemsSource == _colEntities)
{
_colRecipes.RemoveAt(oldItemIndex);
_colEntities.RemoveAt(oldItemIndex);
}
}
}
Expand All @@ -375,17 +375,17 @@ private void DataSourceReplaceItem(int itemIndex)
{
if (itemsControl != null && itemsControl.ItemsSource != null)
{
if (itemsControl.ItemsSource == _colRecipes)
if (itemsControl.ItemsSource == _colEntities)
{
BitmapImage bitmapImage = GetBitmapImage(_colRecipes.Count % 126 + 1);
BitmapImage bitmapImage = GetBitmapImage(_colEntities.Count % 126 + 1);

var recipe = new Recipe()
var entity = new Entity()
{
BitmapImage = bitmapImage,
Id = _colRecipes.Count
Id = _colEntities.Count
};

_colRecipes[itemIndex] = recipe;
_colEntities[itemIndex] = entity;
}
}
}
Expand Down Expand Up @@ -595,7 +595,7 @@ private void BtnSetItemsPanelOrientation_Click(object sender, RoutedEventArgs e)
}
}

itemsControl.ItemsSource = _colRecipes;
itemsControl.ItemsSource = _colEntities;
}
}

Expand Down Expand Up @@ -659,31 +659,31 @@ private void BtnDataSourceSetItemCount_Click(object sender, RoutedEventArgs e)
{
int newItemCount = int.Parse(txtDataSourceItemCount.Text);

if (itemsControl.ItemsSource == _colRecipes)
if (itemsControl.ItemsSource == _colEntities)
{
if (_colRecipes.Count < newItemCount)
if (_colEntities.Count < newItemCount)
{
var colRecipesEnd = new List<Recipe>();
var colEntitiesEnd = new List<Entity>();

for (int itemIndex = 0; itemIndex < newItemCount - _colRecipes.Count; itemIndex++)
for (int itemIndex = 0; itemIndex < newItemCount - _colEntities.Count; itemIndex++)
{
BitmapImage bitmapImage = GetBitmapImage(itemIndex % 126 + 1);

colRecipesEnd.Add(new Recipe()
colEntitiesEnd.Add(new Entity()
{
BitmapImage = bitmapImage,
Id = itemIndex
});
}

_colRecipes = new ObservableCollection<Recipe>(_colRecipes.Concat(colRecipesEnd));
_colEntities = new ObservableCollection<Entity>(_colEntities.Concat(colEntitiesEnd));
}
else if (_colRecipes.Count > newItemCount)
else if (_colEntities.Count > newItemCount)
{
_colRecipes = new ObservableCollection<Recipe>(_colRecipes.Take(newItemCount));
_colEntities = new ObservableCollection<Entity>(_colEntities.Take(newItemCount));
}

itemsControl.ItemsSource = _colRecipes;
itemsControl.ItemsSource = _colEntities;
}
}
}
Expand Down
29 changes: 20 additions & 9 deletions src/controls/dev/CommonStyles/TestUI/ListViewBasePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
<ScrollViewer x:Name="svDataSource" Grid.Row="1" Grid.Column="1">
<Grid Margin="4,0,4,0" Padding="6"
BorderBrush="{ThemeResource SystemChromeGrayColor}" BorderThickness="1"
RowDefinitions="Auto, Auto, Auto, Auto, Auto, Auto, Auto, Auto"
RowDefinitions="Auto, Auto, Auto, Auto, Auto, Auto, Auto, Auto, Auto"
ColumnDefinitions="Auto, Auto, Auto, Auto">
<TextBlock Text="Data Source" Foreground="Red"/>

Expand All @@ -244,14 +244,21 @@
<Button x:Name="btnDataSourceSetItemCount" Content="S" Margin="1" Grid.Row="1" Grid.Column="3" HorizontalAlignment="Stretch" VerticalAlignment="Center" Click="BtnDataSourceSetItemCount_Click"/>

<Button x:Name="btnDataSourceAddItem" Content="Add Item" Margin="1" Grid.Row="2" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Center" Click="BtnDataSourceAddItem_Click"/>
<Button x:Name="btnQueueDataSourceAddItem" Content="Q" Margin="1" Grid.Row="2" Grid.Column="2" VerticalAlignment="Center" Click="BtnQueueDataSourceAddItem_Click"/>
<Button x:Name="btnDataSourceRemoveAllItems" Content="Remove All Items" Margin="1" Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Center" Click="BtnDataSourceRemoveAllItems_Click"/>

<TextBlock Text="ItemIndex:" Grid.Row="4" VerticalAlignment="Center" Margin="0, 4, 0, 0"/>
<TextBox x:Name="txtDataSourceItemIndex" Text="0" Grid.Row="4" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Center"/>

<Button x:Name="btnDataSourceReplaceItem" Content="Replace Item" Margin="1, 7, 1, 1" Grid.Row="5" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Center" Click="BtnDataSourceReplaceItem_Click"/>
<Button x:Name="btnDataSourceInsertItem" Content="Insert Item" Margin="1" Grid.Row="6" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Center" Click="BtnDataSourceInsertItem_Click"/>
<Button x:Name="btnDataSourceRemoveItem" Content="Remove Item" Margin="1" Grid.Row="7" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Center" Click="BtnDataSourceRemoveItem_Click"/>
<Button x:Name="btnQueueDataSourceRemoveAllItems" Content="Q" Margin="1" Grid.Row="3" Grid.Column="2" VerticalAlignment="Center" Click="BtnQueueDataSourceRemoveAllItems_Click"/>
<Button x:Name="btnDataSourceRaiseResetNotification" Content="Raise Reset Notification" Margin="1" Grid.Row="4" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Center" Click="BtnDataSourceRaiseResetNotification_Click"/>
<Button x:Name="btnQueueDataSourceRaiseResetNotification" Content="Q" Margin="1" Grid.Row="4" Grid.Column="2" VerticalAlignment="Center" Click="BtnQueueDataSourceRaiseResetNotification_Click"/>

<TextBlock Text="ItemIndex:" Grid.Row="5" VerticalAlignment="Center" Margin="0, 4, 0, 0"/>
<TextBox x:Name="txtDataSourceItemIndex" Text="0" Grid.Row="5" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Center"/>

<Button x:Name="btnDataSourceReplaceItem" Content="Replace Item" Margin="1, 7, 1, 1" Grid.Row="6" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Center" Click="BtnDataSourceReplaceItem_Click"/>
<Button x:Name="btnQueueDataSourceReplaceItem" Content="Q" Margin="1, 7, 1, 1" Grid.Row="6" Grid.Column="2" VerticalAlignment="Center" Click="BtnQueueDataSourceReplaceItem_Click"/>
<Button x:Name="btnDataSourceInsertItem" Content="Insert Item" Margin="1" Grid.Row="7" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Center" Click="BtnDataSourceInsertItem_Click"/>
<Button x:Name="btnQueueDataSourceInsertItem" Content="Q" Margin="1" Grid.Row="7" Grid.Column="2" VerticalAlignment="Center" Click="BtnQueueDataSourceInsertItem_Click"/>
<Button x:Name="btnDataSourceRemoveItem" Content="Remove Item" Margin="1" Grid.Row="8" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Center" Click="BtnDataSourceRemoveItem_Click"/>
<Button x:Name="btnQueueDataSourceRemoveItem" Content="Q" Margin="1" Grid.Row="8" Grid.Column="2" VerticalAlignment="Center" Click="BtnQueueDataSourceRemoveItem_Click"/>
</Grid>
</ScrollViewer>

Expand All @@ -260,7 +267,11 @@
ColumnDefinitions="*">
<TextBlock Text="Logs" Foreground="Red"/>

<Button x:Name="btnClearLogs" Grid.Row="1" Content="Clear" Click="BtnClearLogs_Click" Margin="1"/>
<StackPanel Orientation="Horizontal" Grid.Row="1">
<Button x:Name="btnClearLogs" Content="Clear" Margin="1" Click="BtnClearLogs_Click"/>
<CheckBox x:Name="chkLog" Content="Log?" Margin="1" IsChecked="True"/>
</StackPanel>

<ListBox x:Name="lstLogs" Margin="1" Grid.Row="2"/>
</Grid>

Expand Down
Loading

0 comments on commit 90b45c6

Please sign in to comment.