ด้วยเหตุผลบางอย่าง ฉันไม่สามารถซ่อน DataGridColumn ของ WPF Toolkit ได้ ฉันกำลังพยายามทำสิ่งต่อไปนี้:
<dg:DataGridTemplateColumn Header="Item Description" Visibility="{Binding IsReadOnly}">
<dg:DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBox Text="{Binding Path=ItemDescription}" />
</DataTemplate>
</dg:DataGridTemplateColumn.CellTemplate>
This doesn't work, since it's looking for a IsReadOnly property on the ItemSource (not a property of the current class). If add this as a property of the ItemSource class that implements INoifyPropertyChanged, it still doesn't hide the column. Is there a way around this? I want the column to hid when a button click changes IsReadOnly property.
สมมติว่า IsReadOnly ส่งกลับค่าการมองเห็นและเป็นคุณสมบัติการขึ้นต่อกัน
ฉันติดอยู่อย่างสมบูรณ์ ฉันขอขอบคุณความช่วยเหลือจริงๆ! ขอบคุณมาก!