Metro Style Apps Two way Binding with XML - microsoft-metro

Can I do two way binding with an XML document in metro style apps (using WPF/C#)? I want my XML file to get updated as soon as I make a change on the UI

Sure. After update invoke your method that will update your xml file. It won`t work automaticly, you need to manage this yourself

You are asking about XAML's Mode=TwoWay binding (default is Mode=OneWay), but I think you really mean UpdateSourceTrigger=PropertyChanged (as in WPF) which in WinRT is a bit of a trick. Answer is here: “UpdateSourceTrigger=PropertyChanged” equivalent for a TextBox in WinRT-XAML

may be u can call the saveXML() method on 'textChanged' event of the textboxes or any other UI controls of your metro app...

Related

how to allow multi select on gwt combobox

I have combo-box and i want to allow multiple selection on it
how to do that??
newEmployee = new ComboBox<NctrUserDTO>();
newEmployee.setFieldLabel("Employee");
newEmployee.setDisplayField(NctrUserDTO.NAME);
newEmployee.setTriggerAction(TriggerAction.ALL);
newEmployee.setEditable(true);
newEmployee.setStore(employeeList);
newEmployee.setMaxHeight(200);
I don't know which API's ComboBox you're using since vanilla GWT doesn't have a ComboBox, but I'd guess it's not possible to do this unless you change the ComboBox class itself/write an actual MultiSelectComboBox class. Unless your version happens to have an "enableMultiSelect" method already in-built, but you probably wouldn't be asking here then.
If it helps, I found this thread which seems similar to what you're describing.

How to programmatically change help contents in Eclipse?

I have an eclipse plugin and I would like to programmatically disable help content TOC's based on a variable I define. In a nut shell, I want to prevent some help docs from showing up in the help contents if a specific type of user is accessing the plugin.
Preferably I would like to do this in the ApplicationWorkbenchAdvisor somewhere.
One thought would be to modify the "primary" value to be false if the variable were set.
Not sure if it would work, but try using the org.eclipse.ui.activities extension point. The tutorial from Vogella tells it is possible to hide only UI elements like wizards, views and so on, but it is from 2009.. Not sure if hiding TOC is now possible. If you try it out, would be nice to give a feedback ;)

Best practices of theming/skinning an iOS app?

What are some best practices of theming/skinning an iOS app?
Examples:
Using custom images as screen backgrounds.
Modifying the look of UITableView tables.
Buttons with a custom look.
Links to good tutorials are a plus.
You can create a protocol that defines methods to return theme-specific colors, images, etc. All classes that conform to this protocol have to implement these methods.
#protocol MyCustomThemes <NSObject>
-(UIFont*)writingAreaFont;
-(UIColor*)dataCellLabelColor;
-(UIImage*)dataCellBackgroundImage;
#end
I can suggest that:
Make theme class
Make function to return background image(s)
Make function to return data cell.
make any required function in the theme class.
the init function should have one parameter to plist file that contains the assets(images) that will be needed for your class to work properly. it should be a plist file that contains a dictionary for a predefined keys.
I hope that helps.
You might take a look at NUI, which lets you modify the theme/skin of an app very easily, and save that theme for other apps, too.
For example, if you wanted to use a custom image for the background of all of your UIViews, you would just put the following in the NUI style sheet:
ViewBackgroundImage String MyImage.png
NUI supports styling for UITableViews and UIButtons, too (as mentioned in your other examples).
You might want to check out Freestyle. It's built on Pixate, and styles your app with structured Sass. You can do as little as change the variable values to make a new theme, or extend and customize it via CSS or Sass.
Old question, but still - if you're looking for best practices, then UIAppearance is probably it.
However, if you're looking for a more powerful way to style your app (and create themes) - also have a look at InterfaCSS. InterfaCSS uses stylesheets inspired by CSS (and Less/Sass) that support a rich selector syntax and lets you use standard UIKit property names.
I know this may be late but I've stumbled upon a theme framework called Pixate. Pixate allows you to theme all your components using css. It's native meaning no web views and what not AND its fairly easy to implement in an existing project. Check it out.

Is there an existing iOS component to type in a UITextView? [duplicate]

In my app I want the user to type names into a UITextField (or equivalent) and then when they press return, it will put that word(s) in a blue bubble that's usually associated with tags. The cursor then moves to the end where they can add more "tags".
This can be seen when adding contacts in the To, CC & BCC fields in the Mail app, and also when selecting contacts in the Messages app.
How is this done? Is it something that's provided in the UIKit or available somewhere else?
Many thanks,
Michael
Venmo just open sourced their token field.
https://github.com/venmo/VENTokenField.git
edited:
The equivalent control in desktop Cocoa is an NSTokenField, but there doesn't seem to be an equivalent for Cocoa Touch.
Since iOS 13 there exists UISearchTextField.
https://developer.apple.com/documentation/uikit/uisearchtextfield
You can see that component in action in the Photos App.
That should fit for many use cases. By removing the leftView you can also get rid of the search icon.
But be aware: You can‘t mix text and tokens at various positions.
From the docs:
Tokens always occur contiguously before any text in the search field.
Adding this here for reference:
Feel free to check out TaggerKit (a library I made), it's more or less what OP was talking about. You can basically add tags functionality to your app by just adding a view and a couple of properties.
I dont think you can do it with any built in functionality in the SDK, never seen such a feature. What you could do however is implement it yourself, have some custom blue button with some text over it, and when the user hits return you can have some code that takes the text and returns you the button that you need, shouldnt be too bad to implement

GWT ValueListBox: can it support more than a single selection?

Can GWT's ValueListBox support multiple selections? Also, is there a way to get it to display more than a single value at a time (like ListBox.setVisibleItemCount()) ?
It seems like you'd need to get at the underlying ListBox (or somehow provide a custom one) in order to make this happen. Of course getListBox() is private, so that's out.
No. ValueListBox is intended to operate on single value. That's why it can be easily used as editor (from Editor framework) for wrapped type.
For multiple selection you can use ListBox, but AFAIK there's no straightforward way to use it as editor (you have to write your own custom editor based on ListBox).