Hello,
Welcome to Microsoft Q&A!
We could use Device.Idiom to detect if it's on phone or Tablet .
XAML
<Setter Property="FontSize">
<Setter.Value>
<OnIdiom x:TypeArguments="x:Double" Phone="15" Tablet="24"/>
</Setter.Value>
</Setter>
Code behind
var font = (Device.Idiom == TargetIdiom.Phone) ? 15 : 24;
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.