Имеется код пагинатора, который должен при контенте с значением 0 сделать кнопку неактивной, а так же установить контент кнопки как ...:
<Grid>
<ItemsControl ItemsSource="{Binding Paginator.Pages}" Padding="3.5">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel HorizontalAlignment="Center"
Orientation="Horizontal"
ClipToBounds="False" IsItemsHost="True" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.Style>
<Style TargetType="ItemsControl">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ItemsControl}">
<Border BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}"
Padding="{TemplateBinding Padding}"
SnapsToDevicePixels="True">
<ScrollViewer CanContentScroll="True" VerticalScrollBarVisibility="Auto">
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</ScrollViewer>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ItemsControl.Style>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button Command="{Binding ElementName=UserControl, Path=DataContext.LoadPage}"
CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}"
Content="{TemplateBinding Content}"
MinWidth="15" MinHeight="10" Margin="2.5"
Padding="4,2.5,4,2.5" VerticalAlignment="Center">
<Button.Style>
<Style TargetType="{x:Type Button}">
<Style.Triggers>
<DataTrigger
Binding="{Binding RelativeSource={RelativeSource Self}, Path=Content}"
Value="0">
<Setter Property="IsEnabled" Value="False" />
<Setter Property="Content" Value="…" />
</DataTrigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
public class PaginatorViewModel : ViewModelBase
{
public static readonly PropertyData PaginatorProperty = RegisterProperty(nameof(Paginator), typeof(IPaginatorModel));
public static readonly PropertyData LoadPageProperty = RegisterProperty(nameof(LoadPage), typeof(TaskCommand<int>));
public override string Title => "Paginator";
public PaginatorViewModel(IPaginatorModel paginatorModel, IMessageService messageService, TaskCommand<int> commandLoadPage)
{
Paginator = paginatorModel;
LoadPage = commandLoadPage;
}
public TaskCommand<int> LoadPage
{
get => GetValue<TaskCommand<int>>(LoadPageProperty);
set => SetValue(LoadPageProperty, value);
}
public IPaginatorModel Paginator
{
get => GetValue<IPaginatorModel>(PaginatorProperty);
private set => SetValue(PaginatorProperty, value);
}
protected override async Task InitializeAsync()
{
await base.InitializeAsync();
}
protected override async Task CloseAsync()
{
await base.CloseAsync();
}
}
Но смены контента не происходит.
Почему так происходит, и как добиться нормального результата?

Content="{TemplateBinding Content}"и добавьте в стиль перед триггером<Setter Property="Content" Value="{TemplateBinding Content}" />. (Почему там, кстати,TemplateBinding?) – Андрей NOP Mar 07 '19 at 14:38TemplateBindingтогда контента не будет, а через стили его не установить, причину не могу выяснить.член "Content" не является допустимым, так как не имеет соответствующего имени типа.– Mar 07 '19 at 14:43Catel. – Mar 07 '19 at 14:49