Open YZahringer opened 4 years ago
Hm I wonder if this has some connection to what is going on in #5661
@jfversluis Thanks! This also fixes the left "Padding" on TitleView?
Hm that I don't think so, this focusses mostly on the bottom thing. But it should be in the same area
Confirmed this happening in the attached repro project.
I've tried to look into this. It appears the implementation of the TitleView in UWP is such, that it co-exists with the TitleIcon and Title properties, and this is causing the problems.
This becomes more obvious if a Title is added to the repro @jfversluis provided:
Note how the "Title" intrudes on the TitleView.
The left padding is caused by these lines in the default PageControlStyle - where a grid with 3 columns are used: one for any icon, one for the title, and one for the TitleView. As the TextBlock for the Title includes a left padding of 10, this is always there.
I can fix this, but I need to be sure my understanding is correct: that if a TitleView is specified, this should take precedence, and neither the Icon ot the Title property should be shown; but if no TitleView is specified, the Icon and Title should be shown.
?
My temp workaround (hide TextBlock
of Title
in entire app):
<Application.Resources>
<Style x:Key="TitleTextBlockStyle" TargetType="TextBlock">
<Setter Property="Visibility" Value="Collapsed" />
</Style>
<x:Double x:Key="AppBarThemeCompactHeight">48</x:Double>
<x:Double x:Key="AppBarExpandButtonThemeWidth">0</x:Double>
</Application.Resources>
In my opinion, the Title TextBlock should be collapsed when no Title
provided.
Issue persists on XF 5.0.0.1829-pre6
Repro project: bug-uwp-titleview
Description
On UWP the TitleView does not take up all the available space. There is a margin at the bottom and left.
Steps to Reproduce
Expected Behavior
Grid with
BackgroundColor="Red"
Fill Header without margins:Actual Behavior
Grid has Left
10px
and Bottom8px
Margin: Live Visual Tree of Header: It is theBorder
inTitleViewPresenter
that takeswidth=10px
andheight=48px
. This one should haveVisibility=Collapsed
.Basic Information