我们需要更改绑定枚举的值结果
例子:
public enum Speed
{
_256kbps,
_512kbps
}
我们希望将其绑定到 DataGrid,结果为 256kbps,不带“-”破折号
<sdk:DataGrid SelectedItem="{Binding SelectedBandwidthPlan, Mode=TwoWay}" ItemsSource="{Binding BandwidthPlans}" Margin="10,95,10,33" AutoGenerateColumns="False">
<sdk:DataGrid.Columns>
<sdk:DataGridTextColumn Header="ID" Binding="{Binding BandwidthPlanID}"/>
<sdk:DataGridTextColumn Header="AccountType" Binding="{Binding AccountType}"/>
<sdk:DataGridTextColumn Header="BandwidthType" Binding="{Binding BandwidthType}"/>
<sdk:DataGridTextColumn Header="Description" Binding="{Binding Description}"/>
<sdk:DataGridTextColumn Header="Speed" Binding="{Binding Speed}"/>
<sdk:DataGridTextColumn Header="Price" Binding="{Binding Price}"/>
</sdk:DataGrid.Columns>
<!--Events for datagrid bound to ViewModel-->
<!--<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<i:InvokeCommandAction Command="{Binding OnFilterExecute}"></i:InvokeCommandAction>
</i:EventTrigger>
</i:Interaction.Triggers>-->
</sdk:DataGrid>
(有没有办法或)我们如何修改绑定到数据网格的输出?