Posted 28 August 2023, 3:05 am EST
Hi,
As per the development team, It’s a WinUI limitation apparently, not in our controls. WinUI not being able to locate the assets.
Two workarounds possible:
- Converting the app to be Packaged.
- Set a Custom Icon:
<?xml version="1.0" encoding="utf-8" ?>
<Window
x:Class="WinUITestApp1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:c1="using:C1.WinUI.Grid"
xmlns:core="using:C1.WinUI.Core"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:WinUITestApp1"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<StackPanel Orientation="Vertical">
<StackPanel.Resources>
<DataTemplate x:Key="SortAscendingIcon">
<core:C1PathIcon ViewBox="0.0175781268626451 2.466796875 11.96484375 6.515625" Data="M6,2.4667969 L11.982422,8.4550781 L11.455078,8.9824219 L6,3.5332031 L0.54492182,8.9824219 L0.017578125,8.4550781 z"/>
</DataTemplate>
</StackPanel.Resources>
<c1:FlexGrid
x:Name="flexGrid1"
HorizontalAlignment="Left"
SortAscendingIconTemplate="{StaticResource SortAscendingIcon}"
Width="300"
Height="400" ShowSort="True" SortIconPosition="Right" AllowFiltering="True" AutoGenerateColumns="False"
ItemsSource="{x:Bind model}">
<c1:FlexGrid.Columns>
<c1:GridColumn Width="100" Binding="A" HeaderHorizontalAlignment="Center"/>
<c1:GridColumn Width="200" Binding="B" HeaderHorizontalAlignment="Center"/>
</c1:FlexGrid.Columns>
</c1:FlexGrid>
</StackPanel>
</Window>
Please refer the attached sample for the same: WinUITestApp_Mod.zip
Regards,
Nitin