Fixes the layout
This commit is contained in:
@ -15,7 +15,7 @@
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</ContentPage.Resources>
|
||||
<StackLayout Padding="10,10,10,10" BindingContext="{Binding .}">
|
||||
<StackLayout Padding="10,10,10,10">
|
||||
<StackLayout Orientation="Horizontal" Padding="10,10,10,10">
|
||||
<Label Text="{Binding Client.UserName}" LineBreakMode="WordWrap"></Label>
|
||||
<Label Text="{Binding Query.Location.Address}" LineBreakMode="WordWrap"></Label>
|
||||
@ -23,9 +23,10 @@
|
||||
</StackLayout>
|
||||
|
||||
<views:MarkdownView x:Name="mdview"
|
||||
Edited="OnDescriptionChanged" HorizontalOptions="FillAndExpand"
|
||||
VerticalOptions="FillAndExpand"
|
||||
Markdown="{Binding Description}"
|
||||
Edited="OnDescriptionChanged"
|
||||
HorizontalOptions="FillAndExpand"
|
||||
VerticalOptions="FillAndExpand" MinimumHeightRequest="160" HeightRequest="250"
|
||||
Markdown="{Binding Description, Mode=TwoWay}"
|
||||
RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent,
|
||||
Property=Height,
|
||||
Factor=.4}"
|
||||
@ -34,14 +35,8 @@
|
||||
Factor=1}"
|
||||
></views:MarkdownView>
|
||||
|
||||
<ListView
|
||||
RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent,
|
||||
Property=Height,
|
||||
Factor=.4}"
|
||||
RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent,
|
||||
Property=Width,
|
||||
Factor=1}"
|
||||
>
|
||||
<ListView RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=.2}"
|
||||
RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ViewCell>
|
||||
|
@ -38,6 +38,20 @@ namespace BookAStar.Views
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user