У меня есть DataTemplate для моего WPF ListBox:WPF ListBox SelectionBox
<DataTemplate DataType="{x:Type local:LogEntry}" x:Key="lineNumberTemplate">
<Grid IsSharedSizeScope="True">
<Grid.ColumnDefinitions>
<ColumnDefinition SharedSizeGroup="Index" Width="Auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid Cursor="/LogViewer;component/Template/RightArrow.cur">
<Rectangle Fill="{Binding Path=LineNumbersBackgroundColor, ElementName=LogViewerProperty}" Opacity="0.4" />
<TextBlock Grid.Column="0" Margin="5,0,5,0" Style="{StaticResource MyLineNumberText}" x:Name="txtBoxLineNumbers" />
</Grid>
<TextBlock Grid.Column="1" Margin="5,0,0,0" Style="{StaticResource MyTextEditor}" />
</Grid>
</DataTemplate>
Возможно ли, что окно выбора начинается не в начале (MyLineNumberText), но в MyTextEditor? Извините, я не знаю, как правильно это описать.
Спасибо, здесь я нашел другой хороший рабочий раствор: http://stackoverflow.com/questions/11064114/resize-wpf-listbox-selection-box – simmeone