Skip to content

Commit

Permalink
Move HeaderedControls dependency to samples only
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-hawker committed Jul 17, 2023
1 parent 3adc07b commit 83dbd1d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
10 changes: 10 additions & 0 deletions components/DataTable/samples/Dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@
For UWP / WinAppSDK / Uno packages, place the package references here.
-->
<Project>
<!-- WinUI 2 / UWP / Uno -->
<ItemGroup Condition="'$(IsUwp)' == 'true' OR ('$(IsUno)' == 'true' AND '$(WinUIMajorVersion)' == '2')">
<PackageReference Include="CommunityToolkit.Uwp.Controls.HeaderedControls" Version="8.0.0-beta.1"/>
</ItemGroup>

<!-- WinUI 3 / WinAppSdk / Uno -->
<ItemGroup Condition="'$(IsWinAppSdk)' == 'true' OR ('$(IsUno)' == 'true' AND '$(WinUIMajorVersion)' == '3')">
<PackageReference Include="CommunityToolkit.WinUI.Controls.HeaderedControls" Version="8.0.0-beta.1"/>
</ItemGroup>

<!-- WinUI 2 / UWP -->
<ItemGroup Condition="'$(IsUwp)' == 'true'">
<!-- <PackageReference Include="Microsoft.Toolkit.Uwp.UI.Controls.Primitives" Version="7.1.2"/> -->
Expand Down
2 changes: 0 additions & 2 deletions components/DataTable/src/Dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@
<PackageReference Include="CommunityToolkit.Uwp.Converters" Version="8.0.0-beta.1"/>
<PackageReference Include="CommunityToolkit.Uwp.Extensions" Version="8.0.0-beta.1"/>
<PackageReference Include="CommunityToolkit.Uwp.Controls.Sizers" Version="8.0.0-beta.2"/>
<PackageReference Include="CommunityToolkit.Uwp.Controls.HeaderedControls" Version="8.0.0-beta.1"/>
</ItemGroup>

<!-- WinUI 3 / WinAppSdk / Uno -->
<ItemGroup Condition="'$(IsWinAppSdk)' == 'true' OR ('$(IsUno)' == 'true' AND '$(WinUIMajorVersion)' == '3')">
<PackageReference Include="CommunityToolkit.WinUI.Converters" Version="8.0.0-beta.1"/>
<PackageReference Include="CommunityToolkit.WinUI.Extensions" Version="8.0.0-beta.1"/>
<PackageReference Include="CommunityToolkit.WinUI.Controls.Sizers" Version="8.0.0-beta.2"/>
<PackageReference Include="CommunityToolkit.WinUI.Controls.HeaderedControls" Version="8.0.0-beta.1"/>
</ItemGroup>
</Project>
16 changes: 8 additions & 8 deletions components/DataTable/tests/DataTableColumnAutoSizeTestPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
mc:Ignorable="d">

<controls:HeaderedItemsControl>
<controls:HeaderedItemsControl.Header>
<ListView>
<ListView.Header>
<controls:DataTable>
<controls:DataColumn DesiredWidth="Auto" />
<!-- Need 2nd column to force size of available for testing -->
<controls:DataColumn DesiredWidth="*" />
</controls:DataTable>
</controls:HeaderedItemsControl.Header>
<controls:HeaderedItemsControl.ItemTemplate>
</ListView.Header>
<ListView.ItemTemplate>
<DataTemplate x:DataType="x:String">
<controls:DataRow>
<Border MinWidth="50"
Expand All @@ -26,16 +26,16 @@
<Border Tag="ExtraArea" />
</controls:DataRow>
</DataTemplate>
</controls:HeaderedItemsControl.ItemTemplate>
<controls:HeaderedItemsControl.ItemContainerStyle>
</ListView.ItemTemplate>
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
</Style>
</controls:HeaderedItemsControl.ItemContainerStyle>
</ListView.ItemContainerStyle>

<!-- Content -->
<x:String>1</x:String>
<x:String>SuperLongString</x:String>
<x:String>Short</x:String>
</controls:HeaderedItemsControl>
</ListView>
</Page>

0 comments on commit 83dbd1d

Please sign in to comment.