I do have one hozitontal StackLayout that contains two vertical StackLayouts. When I turn on VoiceOver it reads by rows not by stacks. Is there any solution? I also tried that in Grid but problem was same... ty
I solved my problem by using
AutomationProperties.SetIsInAccessibleTree(myStackLayout, true);
AutomationProperties.SetName(myStackLayout, Title + " " + Value + " " + Unit);
it reads well whole control at once
source: https://blog.xamarin.com/accessbility-xamarin-forms/
Related
My assignment is to create a program that displays two buttons and my name and current time/date on the main screen. The goal is to have a passage appear once one of the buttons are pressed that will make use of the entire screen. So far, I have created the main page with the labels and buttons. However, I am very lost as to how to display the passage with respect to the button clicked. I am using the empirically fitting text way to make the best use of the screen. I have created a FontCalc.Cs page and added onContentViewSizeChanged method in the mainpage where I have all my code. I don't know how to proceed next. So far, this is what I have in my click handler event:
passage1Button.Clicked += (sender, args) =>
{
passage.Text = "So they began working together, each squadron leader commanding indivual pilots, " +
"Ender comanding the squadron leaders. They learned manyw ays of working together, " +
"as the simulator forced them to try different situations. Sometimes the simulator " +
"gave them a larger fleet to work with; Ender set them up then in three or four " +
"toons that consisted of three or four squadrons each. Sometimes the simulator gave " +
"them a single starship with its twelve fighters, and he chose three sqaudron leaders. ";
ContentView contentView = new ContentView
{
Content = passage
};
contentView.SizeChanged += onContentViewSizeChanged;
Instead of displaying the passage while having the buttons go away, it only freezes both the android emulator and the UWP local machine.
You can show a modal on button click
passage1Button.Clicked += (sender, args) =>
{
var contentpage = new ShowTextPage("Passage text here, goes to page constructor where label is set to passed text");
var page = new NavigationPage(contentpage);
Navigation.PushModalAsync(page);
}
On the ShowTextPage, set HasNavigationBar to false
i'm building an FMX app for Win32 (one form only) with C++ Builder. I'd like the program to remember where it's form was located on the users screen and it's size (it is resizeable) for the next time the user runs it.
Can someone point me in the right direction?
thanks,
relayman
UPDATE: Thanks Sam. I did what you said but wrote the position info to an SQLite db instead of text file. The db has a table named "pos" with 5 integer fields. 4 are the positions and 1 is named "item" and is just to facilitate my update query (I'm not sql expert by long shot). Note, the code below needs try/catch improvements and some tests to make sure form coordinates are valid.
This code is in the form OnShow event:
TFDQuery *query2;
query2 = new TFDQuery(NULL);
query2->Connection = Form1->FDConnection1;
query2->SQL->Text = "SELECT * FROM pos";
query2->Open();
Form1->Left = query2->FieldByName("left")->AsInteger;
Form1->Top = query2->FieldByName("top")->AsInteger;
Form1->Width = query2->FieldByName("width")->AsInteger;
Form1->Height = query2->FieldByName("height")->AsInteger;
query2->Close();
query2->DisposeOf();
This code is in the form OnClose event:
TFDQuery *queryUPDATE;
queryUPDATE = new TFDQuery(NULL);
queryUPDATE->Connection = Form1->FDConnection1;
queryUPDATE->SQL->Text = "UPDATE pos set left = '" + IntToStr(Form1->Left) + "', top = '" + IntToStr(Form1->Top) + "', width = '" + IntToStr(Form1->Width) + "', heigth = '" + IntToStr(Form1->Height) + "' WHERE item = '1'";
queryUPDATE->ExecSQL();
queryUPDATE->Close();
queryUPDATE->DisposeOf();
OnClose save the position, with, height, state, ... into an INI file. OnCreate restore all that info
I'm currently developping a WebApp with KendoMobile.
I have use a scrollView to display an informations bar like you can see on the picture below :
The problem comes when I click on a marker.
I wrote a function that change the page of the scrollview to match the marker I clicked.
Here is the code of the method :
google.maps.event.addListener(markerObj, 'click', function() {
var page = fournisseursArrayIndexOf(markerObj.data["ID"]);
console.log("marker title : " + markerObj.title + " / footer page : " + page);
var footer = $("#footer").data("kendoMobileScrollView");
var curpage = footer.page;
markers[curpage].setIcon(normalImg);
markerObj.setIcon(selectedImg);
footer.scrollTo(page);
//map.panTo(markerObj.position);
});
I read here that if I use the scrollTo method with a single parameter (the page index that I want to show), there will be a transition animation by default.
But nothing happens, I mean the page do change, but there no animation.
I searched on Kendo forum but the only topic I found is this one but it's the exact opposite of what I want : He want to delete the animation when I want to have it.
But that helps me kind of because it mean that having an animation is possible.
Does someone know the solution to this problem ?
Problem solved ! Sort of...
I tested many things by modifying the code of the KendoMobileScrollView and I found that the animation that is supposed to be displayed when you call the scrollTo method doesn't work with scrollview filled with a template.
So if someone encounter the same problem : you'll have to write a loop that will create the pages of your scrollview and insert it in the DOM.
Looks like this :
var htmlToAppen = "<div data-role=\"page\>"";
for(var i = 0 ; i < yourObjectsArray.length ; i++) {
var curObj = yourObjectsArray[i];
htmlToAppen += "<div> objName : " + curObj.name + "</div>";
htmlToAppen += "</div>";
}
$("#yourScrollDiv").append(htmlToAppend);
$("#yourScrollDiv").kendoMobileScrollView({
enablePager : false
});
By default the data series info/tooltips in flot graph looks like "legend_title of 2.00 = 1234567890.00" Is it possible to remove the .00 or customize to other format? Thanks
Flot doesn't really provide a "built in" tooltip but rather a way to create your own tooltips. From your question, I gather you are following the example here. If you want to customize what the tooltip says just call the showTooltip function with a different "contents".
For instance, To drop the zero's off the numbers call it as:
showTooltip(item.pageX, item.pageY,
item.series.label + " of " + x.toFixed(0) + " = " + y.toFixed(0));
But you can further format it any way you want!
Note: I am not looking to format an entire element a selection occurs in or to use the toolbar or working from within a plugin. The formatting commands will be sent via socket.io so I need a way to format selected text from outside of the CKEditor codebase (any ideas on how to make specific selections would be welcome as well, especially if there is some way to either select text without rendering that selection at the same time and/or formatting text based on start-end/length parameters such that the same result would be achieved - though this isn't an absolute requirement for me, I'd be happy being able to format just the selected text with things like font name, size, etc).
I managed to solve this with the following methods incase anyone is looking for a solution:
$('#' + Document.ID + '_contents iframe').contents()[0].execCommand('forecolor',false,'#00ff00');
$('#' + Document.ID + '_contents iframe').contents()[0].execCommand('JustifyCenter', false, null);
$('#' + Document.ID + '_contents iframe').contents()[0].execCommand('fontsize', false, 15);
$('#' + Document.ID + '_contents iframe').contents()[0].execCommand('fontname', false, names);