Product Bundles
DevCraft
All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
Web
Mobile
Document Management
Desktop
Reporting
Testing & Mocking
CMS
UI/UX Tools
Debugging
Free Tools
Support and Learning
Docs & Resources
Productivity and Design Tools
How can we change the background color and text color of the PdfViewerNavigateToPageToolbarItem entry?
The RadPdfViewerToolbar and ButtonToolbarItemView are set with styling.
Hello Chris,
Thank you for contacting us.
To achieve the desired changes in the background and text color of the PdfViewerNavigateToPageToolbarItem entry, follow these steps:
<telerik:PdfViewerNavigateToPageToolbarItem ControlTemplate="{StaticResource PdfViewerNavigateToPageToolbarItemView_ControlTemplate}"/>
<Style x:Key="PdfViewerNavigateToPageToolbarItemView_EntryStyle" TargetType="telerik:RadEntry"> <Setter Property="Keyboard" Value="Numeric" /> <Setter Property="WidthRequest" Value="{OnPlatform Default=40, WinUI=64}" /> <Setter Property="ReserveSpaceForErrorView" Value="False" /> <Setter Property="ClearButtonVisibility" Value="Never" /> <Setter Property="VerticalOptions" Value="Center" /> <Setter Property="BackgroundColor" Value="ForestGreen"/> <Setter Property="TextColor" Value="Red"/> <Setter Property="HorizontalTextAlignment" Value="Center" /> </Style> <ControlTemplate x:Key="PdfViewerNavigateToPageToolbarItemView_ControlTemplate"> <HorizontalStackLayout Spacing="{OnPlatform Default=2, WinUI=4}" Padding="0, 0, 8, 0"> <telerik:RadEntry x:Name="PART_CurrentPageEntry" Text="{Binding Source={RelativeSource TemplatedParent}, Path=CurrentPageNumber, Mode=TwoWay}" Style="{StaticResource PdfViewerNavigateToPageToolbarItemView_EntryStyle}" /> <Label Text="{Binding TotalPages, Source={RelativeSource TemplatedParent}, StringFormat='/{0}'}" VerticalOptions="Center" VerticalTextAlignment="Center" /> </HorizontalStackLayout> </ControlTemplate>
I also have logged as a feature request to create a style property for the PdfViewerNavigateToPageToolbarItem here.
I hope this helps.
Regards, Masha Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.