how to combine bing map and list view? - windows-8

i have a bing map in my application. All stored locations from my db are displayed on map as pushpins. On the right of the map i have a list of this positions. What do I need to do to change the color of pushpin on the map after clickng the position on the list view ?

To do this you need some kind of data to link the list item to the pushpin. If you have a unique ID value to can store this as an attribute of your list item (Tag property works well). You can also store the ID value in the Tag property of the pushpin.
Then, when you want to set the selected pushpin, loop through all the pushpins on the map and check for the correct, id in the tag property. want to set the background color of the pushpins to the default value you want, and when you find the pushpin with the matching id, set the background color to the highlighting color.

Related

Spinner on clicking an item in DetailsList

How do I show a spinner in a DetailsList? For instance, let's say I have the following items in a DetailsList:
list of items
On clicking the item with the name 'AdipiscingUt.onetoc', show a spinner on the rightmost side of that item (next to 125 KB). Please let me know if you have any suggestions on the same.
Thanks!
You can use selection attribute in <DetailsList> component to catch the selection events. Then create extra column with hidden spinner and display it via selection event.
At least I had the experience when I needed to display the icon status according to each item. I added unique id per each item (using onRender method for columns attribute in <DetailsList>) and use it for identification.

Need help to change markers based on horizontal scrolling on list react native

i need to highlight the marker based on the corresponding restaurant selected in the horizontal list and on scroll the marker highlight needs to change
any tips or example code to achieve this would be a great help.
i'm using react-native-maps library
Thanks.
If you map list elements with the markers on creation, you can retrieve which element is displayed like this:
int last = listView1.getLastVisiblePosition();
int first = listView1.getFirstVisiblePosition();
so after scroll, when you notify change to adapter, you can change color of specific marker:
marker.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE));
Hope it helps.
Follow these steps to achieve this:
Set resturantId as Tag to each Marker.
Add scroll listener to your ListView and on scroll stop get the position of
of last visible item like this: int last = listView.getLastVisiblePosition();
Get the id of the current focused item and apply a Loop on All markers and if Tag of marker matches with the resturantId then change marker icon accordingly and a different icon for all other markers.
This would help you.

Assign data to an item in a list?

I've set up a list that shows all available fonts. The issue I am having is assigning the actual font "data" to the list item itself so that, when clicked, it will apply that font to the textbox.
How would I go about doing this?
(I'm entirely new to this)
You don't need to, in your case. But if I interpret your question correctly..
What you can do is something like this:
myTextBox.Font = New Font(myListBox.SelectedItem, myTextBox.Font.Size)
This way, you'll be able to assign the font to the textbox based on your listbox's selected item, provided the listbox item IS the name of the font.

Labview : Changing color of boolean array, respectively

I made this boolean array.
I want change the color of first boolean component as red, and second as blue.
This picture is what I want.
But when I change color property, three booleans change their color with together.
Is there any way to change color of boolean components, respectively?
Short answer: Just replace the boolean with a color box, as shown in the links in the other reply. It will simply be an array of color boxes instead of an array of booleans.
Long answer: An Array control contains an inner element control. The only property that can differ between elements of the array is the Value property. All other properties are rendered identically across elements of the array. If you need to differentiate the elements based on something other than the Value, you need to either use a different control that renders the graphical aspect that you want as its Value (i.e. replacing the Boolean with a Color Box) or you need to break out the N elements that you want to display as N separate independent controls and manage the updating of the display by yourself through code on the block diagram. This generally means creating your own scrollbar control or numeric control for controlling the index of the array.
You can always try to change your approach a little, try using clusters and if you need to use array, then create array of clusters. Here and here are similar subjects that should help you solving the problem with colors.

strike through a selected row in NSTableView

I am new to mac app.In my application i have booked history tableview.when the user click on "withdraw" button,I want to strike through the selected row of the tableview.And I am getting tableview content from NSArraycontroller.I don't know how to do it.If any one knows,guide me to do.
This is in mac osx,not in ios.
One way to obtain this would be to use a NSTextView inside your table cell and then bind the attribute string to you array controller. Now in the array controller you can change the relative value by adding an attribute of the type NSStrikethroughStyleAttributeName.