Fixes the layout
This commit is contained in:
parent
6503a111ee
commit
3c07fa7322
2 changed files with 21 additions and 12 deletions
|
|
@ -15,7 +15,7 @@
|
||||||
</Style>
|
</Style>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</ContentPage.Resources>
|
</ContentPage.Resources>
|
||||||
<StackLayout Padding="10,10,10,10" BindingContext="{Binding .}">
|
<StackLayout Padding="10,10,10,10">
|
||||||
<StackLayout Orientation="Horizontal" Padding="10,10,10,10">
|
<StackLayout Orientation="Horizontal" Padding="10,10,10,10">
|
||||||
<Label Text="{Binding Client.UserName}" LineBreakMode="WordWrap"></Label>
|
<Label Text="{Binding Client.UserName}" LineBreakMode="WordWrap"></Label>
|
||||||
<Label Text="{Binding Query.Location.Address}" LineBreakMode="WordWrap"></Label>
|
<Label Text="{Binding Query.Location.Address}" LineBreakMode="WordWrap"></Label>
|
||||||
|
|
@ -23,9 +23,10 @@
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
|
|
||||||
<views:MarkdownView x:Name="mdview"
|
<views:MarkdownView x:Name="mdview"
|
||||||
Edited="OnDescriptionChanged" HorizontalOptions="FillAndExpand"
|
Edited="OnDescriptionChanged"
|
||||||
VerticalOptions="FillAndExpand"
|
HorizontalOptions="FillAndExpand"
|
||||||
Markdown="{Binding Description}"
|
VerticalOptions="FillAndExpand" MinimumHeightRequest="160" HeightRequest="250"
|
||||||
|
Markdown="{Binding Description, Mode=TwoWay}"
|
||||||
RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent,
|
RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent,
|
||||||
Property=Height,
|
Property=Height,
|
||||||
Factor=.4}"
|
Factor=.4}"
|
||||||
|
|
@ -34,14 +35,8 @@
|
||||||
Factor=1}"
|
Factor=1}"
|
||||||
></views:MarkdownView>
|
></views:MarkdownView>
|
||||||
|
|
||||||
<ListView
|
<ListView RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=.2}"
|
||||||
RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent,
|
RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}">
|
||||||
Property=Height,
|
|
||||||
Factor=.4}"
|
|
||||||
RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent,
|
|
||||||
Property=Width,
|
|
||||||
Factor=1}"
|
|
||||||
>
|
|
||||||
<ListView.ItemTemplate>
|
<ListView.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<ViewCell>
|
<ViewCell>
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,20 @@ namespace BookAStar.Views
|
||||||
|
|
||||||
public event EventHandler<EventArgs> Edited;
|
public event EventHandler<EventArgs> Edited;
|
||||||
|
|
||||||
|
protected override SizeRequest OnMeasure(double widthConstraint, double heightConstraint)
|
||||||
|
{
|
||||||
|
double width = widthConstraint;
|
||||||
|
double height = heightConstraint;
|
||||||
|
|
||||||
|
if (MinimumWidthRequest>0)
|
||||||
|
width = widthConstraint > 80 ? widthConstraint < double.MaxValue ? widthConstraint : MinimumWidthRequest : MinimumWidthRequest;
|
||||||
|
|
||||||
|
if (MinimumHeightRequest > 0)
|
||||||
|
height = heightConstraint > 160 ? heightConstraint < double.MaxValue ? heightConstraint : MinimumHeightRequest : MinimumHeightRequest;
|
||||||
|
|
||||||
|
return base.OnMeasure(width, height);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue