Dynamic appbar icon with text - dynamic

I'm working on a WP8.1 app.
I have a circle in the appbar which is an button icon (transparent png).
Also I have a textbox on the screen of the app. When I enter a number in that text box can i show that number also in the middle of the circle in the appbar as well?
In other words can I have dynamic txt content in a WP8.1 app bar overlaid on top or bottom of a transparent Appbar button icon?

Yes you could have that number in that appbar. First you should get the value entered in the textbox using the Tag property. Then pass value to the Text property of the Appbar using the name you gave:
sampleAppBar.Text = //the value you get from the textbox
For more refer here:
Programatically changing the appbar icons
http://msdn.microsoft.com/library/windows/apps/hh394044(v=vs.105).aspx
Hope it helps!

Related

Navbar image between title and buttons

Is there a way to put a image or some text next to the buttons on the left and right side, but not clickable?
I want to provide some user info (just a number) that's always visible, but it's not an action, so no button.
you can use a custom component for the navBar, using:
navBarCustomView: 'example.CustomTopBar' //registered component name
you can have a look to the style format for the navBar in the docs

How to remove black overlay and ellipse in Universal App AppBar

I'm developing a small Universal App under Windows 10 and Visual Studio 2015 and one of the first things I need to do is add an AppBar in my XAML code to display the standard bar with button at the top of the screen. But for some reason, when I write the following code, I get an ellipse (3 points) at the right and when I click it, immediately to the left of it, there's a black box that I want to get rid of. All I want is to add buttons to it.
Here is my code:
Here is what the output shows:
There's nothing in the code that displays this black area that overlays my buttons when I click the ellipse. Where is this coming from and how do I get rid of it?
Adding on to Justin XL's excellent response, to hide the ellipse in my BottomAppBar, I had to go to App.xaml. Near the bottom of the newly created AppBar style, set the ExpandButton visibility to collapsed:
<Button x:Name="ExpandButton" ... Visibility="Collapsed" .../>

Show hide content in List item in Windows Phone 8.1

I'm developing WP8.1 app in that I need to show some content with show/hide functionality. First 2 lines will be displayed and once clicking on that item the remaining content should expanded and display. How we can achieve this in WP8.1
In order to show or hide you have to go for binding.
And to expand the content, have your DataTemplate as StackPanel and set the Height property of TextBlock (through binding) with the value that is needed to display two lines.
And on tap of the item, just get the selectedItem instance and Increase the height property or set to auto
To know about binding see here http://msdn.microsoft.com/en-us/library/windows/apps/cc278072(v=vs.105).aspx
you can use visibility and collapsed
like that
myimage. visibility =visibility.visible;
you can control with this way

Adding an image to 1 of the tabs on a TabControl, blocks my tab's text

Using Visual Studio 2005 (vb.net) (windows forms) on Windows XP, I have a standard Microsoft TabControl.
A button click adds/removes an image from 1 of the Tabs.
Seems like the image is placed OVER my tab's text, making it unreadable.
Why isn't it like it should be: Image on the left. Followed by text on the right.
Why is the image being placed OVER my tab's text? Do I need to do some kind of "refresh" or "redraw" before it will appear as it should?
I don't see any way to "make the image appear on the left edge of the tab". (NOT the tab-page.) ... and then place the text just to the right of the image. (Just like a normal image+text tab can do.)
The code is pretty simple, it just gets an image from my ImageList:
cfgTab.ImageKey = "PadLockClosed.png" ' Show CLOSED PadLock
The tab's text changes from:
This is my tab text
to:
T(IMAGE HERE)is my tab text
The image appears OVER the beginning of my text. But if I move to another tab, then move back, the image appears in the correct position:
(IMAGE HERE) This is my tab text
You can use docking and anchoring on your Control property so it will be placed according on what you want it to display.
Manage WinForm controls using the Anchor and Dock properties
Resizing a Single Control In WinForms
Regards

Can I edit the UINavigationItem's title from within the app?

So I want the ability to change the title of the UINavigationItem from within the app. To be more specific, I want to be able to tap the title on the navigation bar and have it go into edit mode; where I can type in a new title. Is there any way to do this?
It's quite possible and not very hard in fact. Here are the simple steps:
Navigation item allows for custom views in its title
Add a view with a label similar to that of the native navigation item
Add a transparent button (custom button) on top of the label
Add a hidden text field on top of the button
When the button is pressed, hide the label and show the text field - focus on the text field (becomeFirstResponder)
You are in editing mode: now track for "Return" key being pressed, and once that happens set your label text to what has been entered, resign first responder from the text field and hide it, then show the label
If you adjust all the properties of the UI components it will look like your navigation item supports inline editing!