I created a Xamarin.Forms cross platform App that uses webview to display content from local HTML files named With dates.
I added toolbar items: 'previousDay', 'NextDay', and 'Goto Date'.
Every other thing is working except 'Goto Date' item
I created a DatePicker so that user can select the date to load the HTML file for the date.
The DatePicker didn't display/open.
How can I programmatically display/show the DatePicker when 'Goto Date' Tollbar Item is clicked.
This is what I tried but it didn't work:
DatePicker dp = new DatePicker()
{
Format = "D",
VerticalOptions = LayoutOptions.CenterAndExpand,
MinimumDate = new DateTime(2016, 1, 1),
MaximumDate = new DateTime(2017, 12, 31),
};
dp.Focus();
Please, help!
Jason is right.
You have to add all controls to your view stack to be able to use it.
If you - like you wrote - show your data in a webview, you e.g. can add a stacklayout as main control and then add the datepicker as first and the webview as second control.
The page then shows the datepicker on top and below the webview.
Your further can show and hide the controls, if you want (e.g. show the datepicker only, if a button / toolbar item is tapped.
If you add the datepicker already to your viwe stack, you have to show us your code (in this case something in your code seems to be wrong).
Related
Is there any way or any framework or any particular ionic component to implement this below kind of feature.
Here is what I want:
When I open the component for first time the pop over automatically appears over a button ( like we have page tour in websites ). On click on GOT IT it will dismiss.
Use the popover component (https://ionicframework.com/docs/api/popover) with
ionViewDidEnter(){ }
As the popover is most of the time triggered by a click, you'll need to use javascript to "fake" a click :
ionViewDidEnter(){
let element: HTMLElement = document.getElementById('button') as HTMLElement;
element.click();
}
And then you create your onClick() method for your button to present the popover.
Using either Xamarin.Forms (for UWP), or pure UWP, How do I force the Date value binding to update as soon as a date-part is changed, without requiring the user clicks the "OK"/done/checkmark button?
<DatePicker Date="{Binding StartDate, Mode=TwoWay}" />
The DatePicker template allows you only to change how the control looks like when it is not in the picker mode, but rather when it displays the picked date: https://msdn.microsoft.com/en-us/library/windows/apps/mt299121.aspx?f=255&MSPPError=-2147217396
So basically you would have to make a new DatePicker from the scratch to achieve that.
I'm using Chronoform's 5 Multiplier feature which is triggerd with an 'Add Another Student' button. Prior to the Multiplier, I have two datepickers. Within the Multiplier are two datepickers. The first set of datepickers (prior to the Multiplier) pops up the calendar, as it should. Within the Multiplier, the calendar does not pop up.
Both datepickers have indpendent fieldIDs. After asking Chronoforms regarding this issue, the answer I received was:
"You'd have to add custom code to run when the Add button is clicked and attach the datepicker to the new...input then."
I'm not sure what this means.
Has anyone successfully been able to use Chronoforms 5 to get the datepicker to work within a Multiplier? Users can enter in a date manually, but that's not user-friendly. I would prefer to try to get this working.
Is there a way to add text next to the action icon in the toolbar of an eclipse RCP UI Form? If you do not assign the Action an ImageDescriptor, the action will be displayed containing only text. If you do give it an ImageDescriptor, it displays only the image. I want to display both side by side, within one button - is there a way to do this?
This will have only the text "Description" in the button on the toolbar:
myAction = new Action("Description", SWT.PUSH) {
#Override
public void run() {}
};
myForm.getToolBarManager().add(myAction);
But adding an image will cause the the text to be replaced:
myAction.setImageDescriptor(newImage);
I was eventually able to find an answer to my issue, hopefully it's helpful to anyone else who runs into this problem. I found this in the Eclipse Rich Client Platform (2nd Ed.) book.
The Action must be converted to an ActionContributionItem with its mode set to MODE_FORCE_TEXT. This will display both the text and the image in the toolbar.
ActionContributionItem aCI = new ActionContributionItem(myAction);
aCI.setMode(ActionContributionItem.MODE_FORCE_TEXT);
myForm.getToolBarManager().add(aCI);
I have created site navigation in my ASP.net application using SiteMapPath control and its working fine. Now my requirement is that, there is open page in my application which has Radio buttons and based on their selection datagrid is populated from database. I want to save the radio button selection in navigation url so that when I click on that page through navigation url then page will display the data from my selected options.
Any help would be highly appriciated.
Thanks,
Yogesh
I'm not sure that I understand. I propose some other solution (using Session). Add event to radioButton onSelectionChange. When selection change, remember this in Session
Session["name_param"] = some_params;
And in form with dataGrid get event PageLoad with code:
if ( Session["name_param"] != null ) {
var param = Session["name_param"];
// using param to load data to grid
} else {
// something else, maybe default chance for data to grid
}