WinRT AppBar changing on context (or ignoring right click)? - windows-runtime

I am porting a Desktop WPF application to WinRT and I'm facing a little issue.
I had a ItemsControl and I had a context menu on every item to delete / edit the item.
I have been told that PopupMenu are not good in WinRT and I should use a AppBar.
I think I'm doing something wrong or I misunderstood that.
I thought that I could put that options on a AppBar and when I select an element, popup the bar and click where I need.
The problem is that the AppBar will show up when I right click on any part of my app, so that buttons will show up with an item selected.
So can I change the layout of the AppBar on different contexts (because it seems that Microsoft wants us to use AppBar as context menu without context capabilities) or only show it when I want via code?
Would be good to have a TopAppBar with some App-wide options and a BottomAppBar just for ListView's item context menu.
Or maybe I'm doing all this stuff wrong and I have to use another approach to put extra options on the Listview's items.

You are thinking about this correctly. AppBar is the place where you should put all your non-essential and selection based commands.
The guidelines here and here suggest that they should be arranged as follows:
Navigation commands should be in TopAppBar
Commands related to selection should on the left side of BottomAppBar
The rest of page specific commands should be on the right side of BottomAppBar
Contextual commands should only be shown when a relevant item to that command is selected. For that purpose you should set Visibility of these commands accordingly. Also AppBar should open automatically when an item with contextual commands in it is selected. You can do that programmatically by setting its IsOpen property. You should also set it to sticky mode by via IsSticky property.
If you're using MVVM you can bind your viewmodel properties to all Button and AppBar properties mentioned above.
There's a CustomAppBar control available in WinRT XAML Toolkit. I haven't used it myself yet but it has a couple of extra features that might prove useful in your case.

Related

AEM Core Container Component parsys Showing All Allowed Components when Choosing Style Dropdown Option in Edit Mode bug

This is a weird one. I created a new component by overlaying the Core Container component with sling:resourceSuperType="core/wcm/components/container/v1/container" in my project. In my Container's policy, I have included the allowed components with components="[group:...]" correctly. My Container also has several style dropdown options which are included in the component mapping in the page template.
The problem is, in edit mode, when I choose any one of these style dropdown options, all of the allowed components set in the policy appear inside the container as editable fields. They aren't able to be edited and behave as broken layout containers. All components I have manually added inside the container disappear.
When I refresh the page, the container reverts back to its normal behavior, with the chosen style option set correctly and the added components back in. Has anyone run into this particular issue before? I'm running AEM version 6.5.0 for AEMaaCS and Java 11. Thanks!

How to set Autodesk Setting to front?

I am having an app, which uses the Forge API. The UI displayed when pushing the Forge button "Settings" in "settingsTools group", overlaps one of my buttons.
However since my app zIndex is set (I am in react code) the click upon close of the setting UI, triggers my buttons instead of the close button.
Hence, I am intrested in setting the "Settings UI" to front so the click upon the close button triggers close. My front end code is in the react framework hence a simple zIndex parameter to set could do the trick.
How can I do so?
Instead of playing with hacky ways, consider using the docking panels provided by Forge Viewer. From my understanding, it can also work with React.
To elaborate the usefulness of panels, consider the following example:
Here I have a floating div, showing me some information related to the model. Obviously I've set a high z-index, to bring it upfront and here I have the same problem as you have - when opening things like settings, properties, model tree, etc, they all appear behind my div. Moreover, when changing the size of the window, I have to deal with my div position.
On the other hand, Forge Viewer uses everywhere panels, like this very Settings dialog.
Thus, if you would place your button into this kind of panel, this would save you from headache with z-index, docking, rescaling etc, as all the panels are working nice one with each other, as the below Robot Control Panel:
For more information on how to create a panel, I suggest checking http://learnforge.autodesk.io/#/viewer/extensions/panel

Flash builder / Flex mobile tabbar without container and with custom functions

I am developing app in Flash builder 4.6 as Flex Mobile project.
I have 4 different views being shown inside ViewNavigatorApplication. One of the views need to have tabbed menu bar at the bottom of the screen. That tabbar needs to control sorting method of list element. I could use custom made tabbar but I really want the same look and feel as the one that comes with TabbedViewNavigator. What are my options for doing such tabbar?
Should I use TabbedViewNavigator as application container and start showing/hiding the tabbar as necessary for every view (then I must overwrite the tab buttons handler so that it wont change the view but do the sorting instead) or is there a way to extract the tabbar from TabbedViewNavigator and simply add it to one of the views?

Menu Items in Windows 8?

Am trying to design my metro app like, In my homepage I need to display list of items in a menu on the left side of page and when we click on each item,every item will need to navigate separate page and contains some data.Can anyone suggest me which control should you I take to start my scenario?Working examples are really helpful to me.
Thank you.
Navigation in a WinRT App doesn't use the Menu/Menu-Item metaphor. You can add an App Bar that swipes up from the bottom of the screen that you place contextual controls such as buttons related to the current page or selected item(s). You can also add global settings to the Settings charm that swipes in from the right.
What you are describing sounds like the "Split App" template that comes out of the box with Visual Studio 2012. It consists of a list of items along the left-hand side of the screen which, when selected, change the content on the right-hand side of the screen. Try creating a new Split App and see if that helps.
This is not a completed worked example, but I would recommend looking at two items:
MSDN Documentation for WinJS.Navigation
MSDN Sample for navigation application
These should get you the solution you need -- the sample is quite complete, and can be tailored to your needs.
It sounds to me like what you are talking about is the SplitApp view. Check out this link, the second template listed, just below GridView:
http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh768232.aspx
You'll find that in Modern/Metro things like menus are handled through contextual listviews in the window content area, or through charms (read icons) on the AppBar. Many people hear menu now and cringe, just due to the style guidelines for Chrome/Menu free applications.
If you don't want the content to display next to the links, as the SplitApp view does, you should consider a regular listview for your links, styled however you like and set to display vertically, with click events that take you to whatever detailed page view you want to go to. Navigation is dead simple in a Metro App.
C# Example:
this.Frame.Navigate(typeof(MyDetailPage),myContentId);
Then on your details page, you can get the argument when it's navigated to:
protected override void OnNavigatedTo(NavigationEventArgs e)
{
var myContentId = e.Parameter;
...
}
And if absolutely none of the above was helpful, try checking out these examples. I know you probably aren't making an RSS reader, but they will take you through the basics of the various views and navigation.
Create a blog reader with C#/VB & XAML:
http://msdn.microsoft.com/en-us/library/windows/apps/br211380.aspx
Create a blog reader with JS & Html5:
http://msdn.microsoft.com/en-us/library/windows/apps/hh974582.aspx

Monodevelop: can't drag widgets

I am trying to use monodevelop. Just at the beginning I came across an issue:
I was following a tutorial on building a Gtk application (http://monodevelop.com/Stetic_GUI_Designer). I was trying to drag a button from the Widgets Palette. Nothing happened. I'd been trying quite a few times without any luck.
After a break I launched monodevelop again and I simply placed a button on the window of the application. After that I removed it, dragged VBox container, and placed menu bar on the window, according to the tutorial instructions. I was pleasantly surprised.
By the second try the same problem occurred - I was not able to drag any widgets. Dragging was beginning, there was a “+” sign at the cursor and then - nothing was happening. I cannot figure out what happened by the first time, what the difference was. Have anyone had a similar problem? Monodevelop looks promising, but I can't go on with it. (I tried placing 'Fixed' container on the window, with no result - I could not drag it.)
(monodevelop v. 2.4, ubuntu 11.04, Polish language.
I did look for an answer to my problem, without much luck, that is why I post this question. The problem is described quite precisely. There is a probability that others encountered the same issue.)
You need to drag a container on the form first before you can add widgets to it. The VBox container is an example of a place where you can put your widgets.
If you want to place widgets where ever you want you can use the Fixed container. If you want things to align you can use the VBox, HBox or Table containers. Placing in a widget in one of the fields will automatically adjust the size of this field to fit the widget you have dragged into it.
So basically,
Create a form
Drag a container on the form
Drag a widget inside the container.
These widgets are not to be confused with the custom made widgets (in your Solution browser, right click the folder User Interfaces and click Add Widget...). These are like forms. I use these to create GUI's in advance so I can call these while the program is running.
FYI: if you want to create code for a widget (like a button) you can't just double click it like in Visual Studio. You need to select it, the go to the properties pane, and change the tab from Properties to Signals. You can then double click the "signal" to create the event for which you want to create code. For a button this is usually the Clicked event (somewhere at the bottom of the list, you'll need to open the Button Signals)
You can always visit the IRC channel of Monodevelop on irc://irc.gimp.org/monodevelop (IRC.Gimp.org #monodevelop)
I also sit in this channel and can help with smaller problems and I also still use Monodevelop 2.4.