Unpackaged Build

Posted by: dolan on 17 August 2023, 10:38 pm EST

  • Posted 17 August 2023, 10:38 pm EST

    When I build a project using FlexGrid with Unpackaged and run the EXE file, the Sort Indicator and other icons do not appear. Is there some setting I need to do?

    *I have added

    <WindowsPackageType>None</WindowsPackageType> 
    to the project file

  • Posted 18 August 2023, 6:13 am EST

    Hi,

    We are unable to replicate this issue at our end.

    Could you please provide a small stripped sample replicating this behavior? So, that we can investigate and assist you accordingly.

    Best Regards,

    Nitin

  • Posted 18 August 2023, 8:11 am EST

    Hello, thank you for your response.

    I will send you a minimal project.

    Best regards

    Dolan

    WinUITestApp1.zip

  • Posted 21 August 2023, 1:22 am EST

    Hi,

    Thanks for the sample. We have replicated this issue at our end. This seems like a bug.

    So, we have escalated it to the development team. Will get back to you once we have any update from them.[Internal Tracking Id - C1XAML-34873]

    Best Regards,

    Nitin

  • Posted 22 August 2023, 2:17 am EST

    Thank you very much. We are waiting for your resolution as well.

    Best Regards,

    Dolan

  • 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:

    1. Converting the app to be Packaged.
    2. 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

  • Posted 28 August 2023, 8:03 pm EST - Updated 28 August 2023, 11:09 pm EST

    Thanks for the reply.

    It worked in the sample program, but when I apply it to the actual project, the icon background is displayed in blue. (I’m hoping for transparent/gray)

    Also, the DataPager left and right icons worked, but I cannot customize the 3-dot icons!

    Best regards.

    Dolan

  • Posted 29 August 2023, 3:27 am EST

    The background being blue (probably the default button color) was solved by using C1BitmapIcon.

    Now I can’t customize the DataPager’s 3-dot icon.

  • Posted 29 August 2023, 5:24 am EST

    Hi,

    1. You can set Foreground property of C1PathIcon to change the path color.
    <core:C1PathIcon Foreground="Gray" ..../>
    1. We have replicated this behavior at our end. We can’t set Custom icons for 3dots(…) directly like Sort indicator. We are discussing this with the development team. Will let you know once they respod.[Internla Tracking Id - C1XAML-34922]

    Regards,

    Nitin

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels