Currently I am removing tabs and add again but still there is space top which not looks nice is there any other way thanks.
Try this:
var page = new NavigationPage(new Page1());
await Application.Current.MainPage.Navigation.PushModalAsync(page, true);
Related
How can i get excel/powerpoint theme colors in font settings via officeJs?
Is it possible at all?
I need first row, but if i get all rows it is not problem.
You may have a try Office.OfficeTheme API, see if this API works for you. the document can be found at https://learn.microsoft.com/en-us/javascript/api/office/office.officetheme?view=word-js-preview,
function applyOfficeTheme(){
// Get office theme colors.
var bodyBackgroundColor = Office.context.officeTheme.bodyBackgroundColor;
var bodyForegroundColor = Office.context.officeTheme.bodyForegroundColor;
var controlBackgroundColor = Office.context.officeTheme.controlBackgroundColor;
var controlForegroundColor = Office.context.officeTheme.controlForegroundColor;
// Apply body background color to a CSS class.
$('.body').css('background-color', bodyBackgroundColor);
}
if this doesnt work for you, that should be a new feature ask, and then you could submit your request in uservoice and upvote for this feature at https://officespdev.uservoice.com/forums/224641-feature-requests-and-feedback?category_id=163563. and upvote for this feature. thanks for your support
I have been trying to load some PDFS that will show inside a Bootstrap accordion. The problem is that they load in a lot of different ways depending on the browser. I've been trying iframe and object html tags with different results and i have a huge flow in Safari where the accordion functionality breaks completely when i embed a PDF inside a panel.
So i guess my question is: Is there any sort of standard regarding crossbrowsing in order to make embeded PDF'S work in Chrome, Safari, IE11 and Firefox ?
Since i need this to work on mobile the situation is even worst. Some advice will be really appreciated.
Create a canvas element with the class "panel-body" and give it an id of your choosing. Then add the following code to your document ready event.
PDFJS.getDocument('YOURPDF.pdf').then(function(pdf) {
pdf.getPage(1).then(function(page) {
var scale = 1;
var viewport = page.getViewport(scale);
var canvas = document.getElementById('pdfOne'); // The id of your canvas
var context = canvas.getContext('2d');
canvas.height = viewport.height;
canvas.width = viewport.width;
var renderContext = {
canvasContext: context,
viewport: viewport
};
page.render(renderContext);
});
});
That will get the first page rendered. You'll need to create buttons to let the user navigate through the document but it should be easy enough to get that working based on what I've provided and the samples.
Is there a way to force a new window for this menu action? I can't see anything. i was thinking of adding a class, and some JS code to redirect if the class is there.
If your only intent is to open a window in a new tab, then why don't you set the target="_blank" in your transformation or where ever you are generating the HTML markup?
I am not saying that it's incorrect, however it's just that you can avoid js for this and rather do it in HTML.
Here's what i've done.
In the Navigation panel, i added the class 'nw'. I have this snippet add the target attribute.
// we need to use .nw as a class to indicate that a link should open in a new window.
$('.nw a, a.nw').each(function(i,v){
var $this = $(this);
$this.attr('target','_blank');
});
You can use the JS option and put in JS like: window.open("http://www.google.com");
my page (google for example) isn't adjust to my web view. Why?
The Same code in TestAViewController works.
Thanks a lot
Try this code
self.webView.scalesPageToFit = YES;
self.webView.contentMode = UIViewContentModeScaleAspectFit;
I am using Thickbox in one page,
now as u know, if we click out side the thickbox page [means in the black part],
so i want to remove that behavior, i want to remove that thing....means if the user had click out side of that page in dark part then the page should not be remove-disappear, it should stay in the window..
the only way to close the thickbox page by clicking on that "Close" link,
so is their any way to do this?
thanks in advance,
Nitz.
I know this is an old question but i found another way to do it without changing thickbox source code, after i launch the thickbox window, i do the following:
tb_show('', 'website.php?inlineId=hiddenModalContent&TB_iframe=true');
jQuery("#TB_overlay").off('click');
This removes the click action, so it becomes like a modal window without losing the titlebar.
In the Thickbox.js go to the function tb_show
In this if statement:
if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
$("body","html").css({height: "100%", width: "100%"});
$("html").css("overflow","hidden");
if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6
$("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");
$("#TB_overlay").click(tb_remove); //Remove me
}
}else{//all others
if(document.getElementById("TB_overlay") === null){
$("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");
$("#TB_overlay").click(tb_remove); //Remove me
}
}
You need to comment out both lines that contain $("#TB_overlay").click(tb_remove);. I have added a comment of //Remove Me on the lines you should comment out.
This could help you :-)
$("#TB_overlay").unbind("click",tb_remove);