Lun*_*nyx 16 c# wpf xaml decorator
为简单起见,我有以下缩写
<ItemsControl ItemSource="{Binding enumerableList}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<TextBox Text="{Binding displayName, Mode=OneWay}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
Run Code Online (Sandbox Code Playgroud)
我怎样才能得到它以便我的TextBox在绑定到它的文本前面显示一个子弹点?所需格式:
Saj*_*ran 27
您可以使用BulletDecoratorTextBlock.例:
<BulletDecorator>
<BulletDecorator.Bullet>
<Ellipse Height="10" Width="10" Fill="Blue"/>
</BulletDecorator.Bullet>
<TextBox Text="{Binding displayName, Mode=OneWay}" />
</BulletDecorator>
Run Code Online (Sandbox Code Playgroud)