не помещается на экране при запуске на телефоне. как установить FontSize для этого TextBlock, было специально для версии Android. например для версии для ПК это 24, а для Android - 20
Я пытался сделать это с помощью ChatGPT, но ничего не получилось
вот пример
разметки axaml
Код: Выделить всё
and just the text size of 24 does not fit on the page on the Telophane screen, but everything is fine on the computer screen.
This is what ChatGPT advised me.
...ViewModel
[ObservableProperty]
private bool isAndroid;
public ...ViewModel()
{
IsAndroid = RuntimeInformation.IsOSPlatform(OSPlatform.Create("ANDROID"));
}
and change the markup
Код: Выделить всё
but there were a lot of errors
1.
Error (active) AXN0002 XamlX.XamlParseException: Unable to resolve type DataTrigger from namespace https://github.com/avaloniaui Line 14, position 6.
2. Error (active) CS0103 The name 'InitializeComponent' does not exist in the current context
but I couldn’t fix them and I also couldn’t find a way to do it differently
Подробнее здесь: https://stackoverflow.com/questions/787 ... version-of