Aligning a Frame in Xamarin Forms
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
How to modify the height of the Frame layout. I have tried to set the HeightRequest for the frame, but it doesnt work. Please check the below and attached image.
Frame
Frame frame = new Frame()
{
HasShadow = false,
Margin = new Thickness(10, 0, 0, 10),
BackgroundColor = Color.FromHex("#CDD0D1")
};
Label
Label tag = new Label()
{
TextColor = Color.Black,
FontSize = 14,
};
frame.Content = tag;

Expected Output: My excepted output should be rectangle frame instead of square.
xamarin xamarin.forms frame
add a comment |
How to modify the height of the Frame layout. I have tried to set the HeightRequest for the frame, but it doesnt work. Please check the below and attached image.
Frame
Frame frame = new Frame()
{
HasShadow = false,
Margin = new Thickness(10, 0, 0, 10),
BackgroundColor = Color.FromHex("#CDD0D1")
};
Label
Label tag = new Label()
{
TextColor = Color.Black,
FontSize = 14,
};
frame.Content = tag;

Expected Output: My excepted output should be rectangle frame instead of square.
xamarin xamarin.forms frame
What is the layout that yourFrameis in?
– SuavePirate
Apr 7 '17 at 17:48
@SuavePirate I have used StackLayout in the Frame.
– Parthiban
Apr 8 '17 at 4:58
The layout you're putting your Frame in is most likely restricting the Frame itself. Can you post the implementation for this? Width and Height requests do work, so it's most likely the context you're using the Frame in.
– Joshua Poling
Apr 8 '17 at 20:34
xamarin frame take 20 padding my default you can change it to 0
– Abdullah Tahan
Jul 16 '17 at 8:01
add a comment |
How to modify the height of the Frame layout. I have tried to set the HeightRequest for the frame, but it doesnt work. Please check the below and attached image.
Frame
Frame frame = new Frame()
{
HasShadow = false,
Margin = new Thickness(10, 0, 0, 10),
BackgroundColor = Color.FromHex("#CDD0D1")
};
Label
Label tag = new Label()
{
TextColor = Color.Black,
FontSize = 14,
};
frame.Content = tag;

Expected Output: My excepted output should be rectangle frame instead of square.
xamarin xamarin.forms frame
How to modify the height of the Frame layout. I have tried to set the HeightRequest for the frame, but it doesnt work. Please check the below and attached image.
Frame
Frame frame = new Frame()
{
HasShadow = false,
Margin = new Thickness(10, 0, 0, 10),
BackgroundColor = Color.FromHex("#CDD0D1")
};
Label
Label tag = new Label()
{
TextColor = Color.Black,
FontSize = 14,
};
frame.Content = tag;

Expected Output: My excepted output should be rectangle frame instead of square.
xamarin xamarin.forms frame
xamarin xamarin.forms frame
asked Apr 7 '17 at 17:25
ParthibanParthiban
909
909
What is the layout that yourFrameis in?
– SuavePirate
Apr 7 '17 at 17:48
@SuavePirate I have used StackLayout in the Frame.
– Parthiban
Apr 8 '17 at 4:58
The layout you're putting your Frame in is most likely restricting the Frame itself. Can you post the implementation for this? Width and Height requests do work, so it's most likely the context you're using the Frame in.
– Joshua Poling
Apr 8 '17 at 20:34
xamarin frame take 20 padding my default you can change it to 0
– Abdullah Tahan
Jul 16 '17 at 8:01
add a comment |
What is the layout that yourFrameis in?
– SuavePirate
Apr 7 '17 at 17:48
@SuavePirate I have used StackLayout in the Frame.
– Parthiban
Apr 8 '17 at 4:58
The layout you're putting your Frame in is most likely restricting the Frame itself. Can you post the implementation for this? Width and Height requests do work, so it's most likely the context you're using the Frame in.
– Joshua Poling
Apr 8 '17 at 20:34
xamarin frame take 20 padding my default you can change it to 0
– Abdullah Tahan
Jul 16 '17 at 8:01
What is the layout that your
Frame is in?– SuavePirate
Apr 7 '17 at 17:48
What is the layout that your
Frame is in?– SuavePirate
Apr 7 '17 at 17:48
@SuavePirate I have used StackLayout in the Frame.
– Parthiban
Apr 8 '17 at 4:58
@SuavePirate I have used StackLayout in the Frame.
– Parthiban
Apr 8 '17 at 4:58
The layout you're putting your Frame in is most likely restricting the Frame itself. Can you post the implementation for this? Width and Height requests do work, so it's most likely the context you're using the Frame in.
– Joshua Poling
Apr 8 '17 at 20:34
The layout you're putting your Frame in is most likely restricting the Frame itself. Can you post the implementation for this? Width and Height requests do work, so it's most likely the context you're using the Frame in.
– Joshua Poling
Apr 8 '17 at 20:34
xamarin frame take 20 padding my default you can change it to 0
– Abdullah Tahan
Jul 16 '17 at 8:01
xamarin frame take 20 padding my default you can change it to 0
– Abdullah Tahan
Jul 16 '17 at 8:01
add a comment |
1 Answer
1
active
oldest
votes
Mainly,the frame control in Xamarin is take there own padding in all directions so add padding 0 of frame as:
Frame frame=new Frame{Padding=new Thickness(0)};
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%2f43283888%2faligning-a-frame-in-xamarin-forms%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Mainly,the frame control in Xamarin is take there own padding in all directions so add padding 0 of frame as:
Frame frame=new Frame{Padding=new Thickness(0)};
add a comment |
Mainly,the frame control in Xamarin is take there own padding in all directions so add padding 0 of frame as:
Frame frame=new Frame{Padding=new Thickness(0)};
add a comment |
Mainly,the frame control in Xamarin is take there own padding in all directions so add padding 0 of frame as:
Frame frame=new Frame{Padding=new Thickness(0)};
Mainly,the frame control in Xamarin is take there own padding in all directions so add padding 0 of frame as:
Frame frame=new Frame{Padding=new Thickness(0)};
edited Nov 22 '18 at 9:59
answered Nov 22 '18 at 6:41
SHUBHAM SHARMASHUBHAM SHARMA
316
316
add a comment |
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%2f43283888%2faligning-a-frame-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
What is the layout that your
Frameis in?– SuavePirate
Apr 7 '17 at 17:48
@SuavePirate I have used StackLayout in the Frame.
– Parthiban
Apr 8 '17 at 4:58
The layout you're putting your Frame in is most likely restricting the Frame itself. Can you post the implementation for this? Width and Height requests do work, so it's most likely the context you're using the Frame in.
– Joshua Poling
Apr 8 '17 at 20:34
xamarin frame take 20 padding my default you can change it to 0
– Abdullah Tahan
Jul 16 '17 at 8:01