Drawing Multiple Frame got weird Situation in Xamarin.Forms
While trying to draw multiple Frame keeping same HeightRequest
,WidthRequest
and CornerRadius
, It gives perfect Circular Frame only for that Frame having the highest HeightRequest
. Anybody knows What's happening here?
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:CircleButton"
x:Class="CircleButton.MainPage">
<StackLayout HorizontalOptions="Center" VerticalOptions="Center">
<!-- Place new controls here -->
<Frame HeightRequest="40" WidthRequest="40" CornerRadius="40" BackgroundColor="Orange" Padding="0" OutlineColor="MediumPurple"></Frame>
<Frame HeightRequest="60" WidthRequest="60" CornerRadius="60" BackgroundColor="SkyBlue" Padding="0" OutlineColor="Orange"></Frame>
<Frame HeightRequest="80" WidthRequest="80" CornerRadius="80" BackgroundColor="DarkGray" Padding="0" OutlineColor="Magenta"></Frame>
</StackLayout>
</ContentPage>
Output is shown in Here.
xamarin.forms
add a comment |
While trying to draw multiple Frame keeping same HeightRequest
,WidthRequest
and CornerRadius
, It gives perfect Circular Frame only for that Frame having the highest HeightRequest
. Anybody knows What's happening here?
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:CircleButton"
x:Class="CircleButton.MainPage">
<StackLayout HorizontalOptions="Center" VerticalOptions="Center">
<!-- Place new controls here -->
<Frame HeightRequest="40" WidthRequest="40" CornerRadius="40" BackgroundColor="Orange" Padding="0" OutlineColor="MediumPurple"></Frame>
<Frame HeightRequest="60" WidthRequest="60" CornerRadius="60" BackgroundColor="SkyBlue" Padding="0" OutlineColor="Orange"></Frame>
<Frame HeightRequest="80" WidthRequest="80" CornerRadius="80" BackgroundColor="DarkGray" Padding="0" OutlineColor="Magenta"></Frame>
</StackLayout>
</ContentPage>
Output is shown in Here.
xamarin.forms
add a comment |
While trying to draw multiple Frame keeping same HeightRequest
,WidthRequest
and CornerRadius
, It gives perfect Circular Frame only for that Frame having the highest HeightRequest
. Anybody knows What's happening here?
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:CircleButton"
x:Class="CircleButton.MainPage">
<StackLayout HorizontalOptions="Center" VerticalOptions="Center">
<!-- Place new controls here -->
<Frame HeightRequest="40" WidthRequest="40" CornerRadius="40" BackgroundColor="Orange" Padding="0" OutlineColor="MediumPurple"></Frame>
<Frame HeightRequest="60" WidthRequest="60" CornerRadius="60" BackgroundColor="SkyBlue" Padding="0" OutlineColor="Orange"></Frame>
<Frame HeightRequest="80" WidthRequest="80" CornerRadius="80" BackgroundColor="DarkGray" Padding="0" OutlineColor="Magenta"></Frame>
</StackLayout>
</ContentPage>
Output is shown in Here.
xamarin.forms
While trying to draw multiple Frame keeping same HeightRequest
,WidthRequest
and CornerRadius
, It gives perfect Circular Frame only for that Frame having the highest HeightRequest
. Anybody knows What's happening here?
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:CircleButton"
x:Class="CircleButton.MainPage">
<StackLayout HorizontalOptions="Center" VerticalOptions="Center">
<!-- Place new controls here -->
<Frame HeightRequest="40" WidthRequest="40" CornerRadius="40" BackgroundColor="Orange" Padding="0" OutlineColor="MediumPurple"></Frame>
<Frame HeightRequest="60" WidthRequest="60" CornerRadius="60" BackgroundColor="SkyBlue" Padding="0" OutlineColor="Orange"></Frame>
<Frame HeightRequest="80" WidthRequest="80" CornerRadius="80" BackgroundColor="DarkGray" Padding="0" OutlineColor="Magenta"></Frame>
</StackLayout>
</ContentPage>
Output is shown in Here.
xamarin.forms
xamarin.forms
asked Nov 26 '18 at 10:23
Birbal ZimbaBirbal Zimba
31
31
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
If your StackLayout use this
<StackLayout HorizontalOptions="Center" VerticalOptions="Center">
Then in your Frame also use this can be your want:
HorizontalOptions="Center" VerticalOptions="Center"
So the code is like this:
<StackLayout HorizontalOptions="Center" VerticalOptions="Center">
<!--Modify here -->
<Frame HeightRequest="40" WidthRequest="40" CornerRadius="40" HorizontalOptions="Center" VerticalOptions="Center" BackgroundColor="Orange" Padding="0" OutlineColor="MediumPurple"></Frame>
<Frame HeightRequest="60" WidthRequest="60" CornerRadius="60" HorizontalOptions="Center" VerticalOptions="Center" BackgroundColor="SkyBlue" Padding="0" OutlineColor="Orange"></Frame>
<Frame HeightRequest="80" WidthRequest="80" CornerRadius="80" HorizontalOptions="Center" VerticalOptions="Center" BackgroundColor="DarkGray" Padding="0" OutlineColor="Magenta"></Frame>
</StackLayout>
Then the result is right here.
add a comment |
There is no space for drawing all the frames, that's why it get's cut.
Try setting the StackLayout to FillAndExpand, and then, center all the frames within:
<StackLayout HorizontalOptions="Center" VerticalOptions="FillAndExpand">
<!-- Place new controls here -->
<Frame HeightRequest="40" WidthRequest="40" CornerRadius="40" VerticalOptions="Center"
BackgroundColor="Orange" Padding="0" OutlineColor="MediumPurple"></Frame>
<Frame HeightRequest="60" WidthRequest="60" VerticalOptions="Center" CornerRadius="60" BackgroundColor="SkyBlue" Padding="0" OutlineColor="Orange"></Frame>
<Frame HeightRequest="80" WidthRequest="80" VerticalOptions="Center" CornerRadius="80" BackgroundColor="DarkGray" Padding="0" OutlineColor="Magenta"></Frame>
</StackLayout>
Still it doesn't work . Have u tried it?
– Birbal Zimba
Nov 26 '18 at 17:09
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53479048%2fdrawing-multiple-frame-got-weird-situation-in-xamarin-forms%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
If your StackLayout use this
<StackLayout HorizontalOptions="Center" VerticalOptions="Center">
Then in your Frame also use this can be your want:
HorizontalOptions="Center" VerticalOptions="Center"
So the code is like this:
<StackLayout HorizontalOptions="Center" VerticalOptions="Center">
<!--Modify here -->
<Frame HeightRequest="40" WidthRequest="40" CornerRadius="40" HorizontalOptions="Center" VerticalOptions="Center" BackgroundColor="Orange" Padding="0" OutlineColor="MediumPurple"></Frame>
<Frame HeightRequest="60" WidthRequest="60" CornerRadius="60" HorizontalOptions="Center" VerticalOptions="Center" BackgroundColor="SkyBlue" Padding="0" OutlineColor="Orange"></Frame>
<Frame HeightRequest="80" WidthRequest="80" CornerRadius="80" HorizontalOptions="Center" VerticalOptions="Center" BackgroundColor="DarkGray" Padding="0" OutlineColor="Magenta"></Frame>
</StackLayout>
Then the result is right here.
add a comment |
If your StackLayout use this
<StackLayout HorizontalOptions="Center" VerticalOptions="Center">
Then in your Frame also use this can be your want:
HorizontalOptions="Center" VerticalOptions="Center"
So the code is like this:
<StackLayout HorizontalOptions="Center" VerticalOptions="Center">
<!--Modify here -->
<Frame HeightRequest="40" WidthRequest="40" CornerRadius="40" HorizontalOptions="Center" VerticalOptions="Center" BackgroundColor="Orange" Padding="0" OutlineColor="MediumPurple"></Frame>
<Frame HeightRequest="60" WidthRequest="60" CornerRadius="60" HorizontalOptions="Center" VerticalOptions="Center" BackgroundColor="SkyBlue" Padding="0" OutlineColor="Orange"></Frame>
<Frame HeightRequest="80" WidthRequest="80" CornerRadius="80" HorizontalOptions="Center" VerticalOptions="Center" BackgroundColor="DarkGray" Padding="0" OutlineColor="Magenta"></Frame>
</StackLayout>
Then the result is right here.
add a comment |
If your StackLayout use this
<StackLayout HorizontalOptions="Center" VerticalOptions="Center">
Then in your Frame also use this can be your want:
HorizontalOptions="Center" VerticalOptions="Center"
So the code is like this:
<StackLayout HorizontalOptions="Center" VerticalOptions="Center">
<!--Modify here -->
<Frame HeightRequest="40" WidthRequest="40" CornerRadius="40" HorizontalOptions="Center" VerticalOptions="Center" BackgroundColor="Orange" Padding="0" OutlineColor="MediumPurple"></Frame>
<Frame HeightRequest="60" WidthRequest="60" CornerRadius="60" HorizontalOptions="Center" VerticalOptions="Center" BackgroundColor="SkyBlue" Padding="0" OutlineColor="Orange"></Frame>
<Frame HeightRequest="80" WidthRequest="80" CornerRadius="80" HorizontalOptions="Center" VerticalOptions="Center" BackgroundColor="DarkGray" Padding="0" OutlineColor="Magenta"></Frame>
</StackLayout>
Then the result is right here.
If your StackLayout use this
<StackLayout HorizontalOptions="Center" VerticalOptions="Center">
Then in your Frame also use this can be your want:
HorizontalOptions="Center" VerticalOptions="Center"
So the code is like this:
<StackLayout HorizontalOptions="Center" VerticalOptions="Center">
<!--Modify here -->
<Frame HeightRequest="40" WidthRequest="40" CornerRadius="40" HorizontalOptions="Center" VerticalOptions="Center" BackgroundColor="Orange" Padding="0" OutlineColor="MediumPurple"></Frame>
<Frame HeightRequest="60" WidthRequest="60" CornerRadius="60" HorizontalOptions="Center" VerticalOptions="Center" BackgroundColor="SkyBlue" Padding="0" OutlineColor="Orange"></Frame>
<Frame HeightRequest="80" WidthRequest="80" CornerRadius="80" HorizontalOptions="Center" VerticalOptions="Center" BackgroundColor="DarkGray" Padding="0" OutlineColor="Magenta"></Frame>
</StackLayout>
Then the result is right here.
answered Nov 27 '18 at 5:57
Junior Jiang - MSFTJunior Jiang - MSFT
968127
968127
add a comment |
add a comment |
There is no space for drawing all the frames, that's why it get's cut.
Try setting the StackLayout to FillAndExpand, and then, center all the frames within:
<StackLayout HorizontalOptions="Center" VerticalOptions="FillAndExpand">
<!-- Place new controls here -->
<Frame HeightRequest="40" WidthRequest="40" CornerRadius="40" VerticalOptions="Center"
BackgroundColor="Orange" Padding="0" OutlineColor="MediumPurple"></Frame>
<Frame HeightRequest="60" WidthRequest="60" VerticalOptions="Center" CornerRadius="60" BackgroundColor="SkyBlue" Padding="0" OutlineColor="Orange"></Frame>
<Frame HeightRequest="80" WidthRequest="80" VerticalOptions="Center" CornerRadius="80" BackgroundColor="DarkGray" Padding="0" OutlineColor="Magenta"></Frame>
</StackLayout>
Still it doesn't work . Have u tried it?
– Birbal Zimba
Nov 26 '18 at 17:09
add a comment |
There is no space for drawing all the frames, that's why it get's cut.
Try setting the StackLayout to FillAndExpand, and then, center all the frames within:
<StackLayout HorizontalOptions="Center" VerticalOptions="FillAndExpand">
<!-- Place new controls here -->
<Frame HeightRequest="40" WidthRequest="40" CornerRadius="40" VerticalOptions="Center"
BackgroundColor="Orange" Padding="0" OutlineColor="MediumPurple"></Frame>
<Frame HeightRequest="60" WidthRequest="60" VerticalOptions="Center" CornerRadius="60" BackgroundColor="SkyBlue" Padding="0" OutlineColor="Orange"></Frame>
<Frame HeightRequest="80" WidthRequest="80" VerticalOptions="Center" CornerRadius="80" BackgroundColor="DarkGray" Padding="0" OutlineColor="Magenta"></Frame>
</StackLayout>
Still it doesn't work . Have u tried it?
– Birbal Zimba
Nov 26 '18 at 17:09
add a comment |
There is no space for drawing all the frames, that's why it get's cut.
Try setting the StackLayout to FillAndExpand, and then, center all the frames within:
<StackLayout HorizontalOptions="Center" VerticalOptions="FillAndExpand">
<!-- Place new controls here -->
<Frame HeightRequest="40" WidthRequest="40" CornerRadius="40" VerticalOptions="Center"
BackgroundColor="Orange" Padding="0" OutlineColor="MediumPurple"></Frame>
<Frame HeightRequest="60" WidthRequest="60" VerticalOptions="Center" CornerRadius="60" BackgroundColor="SkyBlue" Padding="0" OutlineColor="Orange"></Frame>
<Frame HeightRequest="80" WidthRequest="80" VerticalOptions="Center" CornerRadius="80" BackgroundColor="DarkGray" Padding="0" OutlineColor="Magenta"></Frame>
</StackLayout>
There is no space for drawing all the frames, that's why it get's cut.
Try setting the StackLayout to FillAndExpand, and then, center all the frames within:
<StackLayout HorizontalOptions="Center" VerticalOptions="FillAndExpand">
<!-- Place new controls here -->
<Frame HeightRequest="40" WidthRequest="40" CornerRadius="40" VerticalOptions="Center"
BackgroundColor="Orange" Padding="0" OutlineColor="MediumPurple"></Frame>
<Frame HeightRequest="60" WidthRequest="60" VerticalOptions="Center" CornerRadius="60" BackgroundColor="SkyBlue" Padding="0" OutlineColor="Orange"></Frame>
<Frame HeightRequest="80" WidthRequest="80" VerticalOptions="Center" CornerRadius="80" BackgroundColor="DarkGray" Padding="0" OutlineColor="Magenta"></Frame>
</StackLayout>
answered Nov 26 '18 at 10:39
Bruno CaceiroBruno Caceiro
3,62111431
3,62111431
Still it doesn't work . Have u tried it?
– Birbal Zimba
Nov 26 '18 at 17:09
add a comment |
Still it doesn't work . Have u tried it?
– Birbal Zimba
Nov 26 '18 at 17:09
Still it doesn't work . Have u tried it?
– Birbal Zimba
Nov 26 '18 at 17:09
Still it doesn't work . Have u tried it?
– Birbal Zimba
Nov 26 '18 at 17:09
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53479048%2fdrawing-multiple-frame-got-weird-situation-in-xamarin-forms%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown