ภาพของปุ่มไม่สามารถมองเห็นได้ใน WPF องโปรแกรม

0

คำถาม

ive มีปัญหากับปุ่มที่ฉันต้องการเพื่อนที่ภายใน ColumnHeader ของฉัน DataGrid. ฉันอยากที่เป็นรูปภาพในที่ปุ่มแต่งภาพ isnt รากฎตัวก่อน อะไรว่ายังไงที่จะแก้ไขเรื่องนี้?

Heres ที่ xaml รหัส:

<DataGridTextColumn x:Name="bemiNr" Visibility="Visible" FontSize="18" IsReadOnly="True" Binding="{Binding Path=bemiNr}">
                <DataGridTextColumn.Header>
                    <Grid Margin="0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="30"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Grid.Column="0" Text="Bemi Nr" />
                        <Button Grid.Column="1" x:Name="btnFilterView" Margin="0,0,0,0" Foreground="White" Background="{x:Null}" HorizontalAlignment="Right">
                            <Image Height="30" Width="30" Source="/TestDB;component/Assets/filter-outline_black.png" />
                        </Button>
                    </Grid>
                </DataGridTextColumn.Header>
            </DataGridTextColumn>

filterimage not visible

c# wpf xaml
2021-11-22 15:44:20
1

คำตอบที่ดีที่สุด

0

อย่างที่คุณพูดในคอมเมนท์ที่คุณตั้งค่าสร้างการกระทำเพื่อ"ทรัพยากร"ลองหาคนมาแทน /TestDB;component/Assets/filter-outline_black.png กับ pack://application:,,,/TestDB;component/Assets/filter-outline_black.png.

2021-11-22 19:20:17

ในภาษาอื่นๆ

หน้านี้อยู่ในภาษาอื่นๆ

Русский
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................

ดังอยู่ในนี้หมวดหมู่

ดังคำถามอยู่ในนี้หมวดหมู่