Windows Store App: Eliminates GridView styles and use only for hub page layout - microsoft-metro

I try to make a Windows Store App (Metro) hub page which has four different templates with GridView.
I referenced link in Creating hub page with different controls in Windows 8 page and it works fine.
But GridView has a default style which interacts with touch(and mouse) activity.
It grayed when hover, and shows click interaction.
My question is, how to disable those behaviors?
I tried to dig with Blend but hard to find the place to be customized.

Sorry I don't know MS Blend
But in visual studio please follow below instruction :
right click on your grid
go to Edit Additional Template
click on 'Edit Generated Item Container(ItemContainerStyle)' > 'Edit a Copy...'
go to XAML code and remove the PointerOver content from your code. the code should be like the following
//some code here
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="PointerOverPressed"/>
<VisualState x:Name="Disabled">
//continue

Related

Custom-UI: Force Developer-Tab to be visible

I have a MS-Word template where the user sometimes will have to edit content controls.
Therefore I would like to force the developer tab to be visible whenever a document based on this template is opened.
I changed the CustomUI:
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon>
<tabs>
<tab idMso="TabDeveloper" visible="true" />
</tabs>
</ribbon>
</customUI>
No error is thrown when the document is opened - but the Developer tab isn't visible.
Any thing else I have to consider, to force the tab to be visible?
(Vice versa works: hiding a visible Developer-Tab by setting visible to false)
(There is no VBA attached to the document.)
OK - sometimes a short break helps:
I am adding a custom tab containing the relevant buttons from the developer tab. Plus: renaming them :-)
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon>
<tabs>
<tab id="Abnahme" label="Abnahmedokument">
<group id="x" label="Eingabefelder">
<button idMso="ContentControlText" label="neues Eingabefeld" size="large"/>
<button idMso="ControlProperties" label="Eingabefeld bearbeiten" size="large"/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
I know of no method other than user education.
You could, in your distribution template, add your own duplicate tab or a tab that has the controls for Content Controls. Better practice is probably to put the Content Control tools on your own additional tab and ignore the Developer Tab.
See also Hide/Show all tabs on Ribbon except Custom tabs which also says there is no method available via VBA.
The following caveat is for someone finding your question in a web search and thinking about using the Word.OfficeUI file and finding this question in a web search. It does not appear that you are doing that.
For customization distribution, the UI editor in Word is a very poor tool. It is intended for personal use.
The Word.OfficeUI file produced by Word will overwrite any user customizations including QAT customizations. Placing that on a user's computer is mean and dictatorial just like overwriting the Normal template. It is a bad practice.
For distribution, you should be editing the XML of a global template. Likewise, such a template is the best method of distributing other user interface customizations like macros and building blocks. The methods for doing this are explored in the book RibbonX: Customizing the Ribbon User Interface and on Greg Maxey's page: Customize the Office Ribbon: It doesn't take rocket science.

Building Blocks not appearing after upgrade to Word 2013

I have a document-level (dotx) customization, with a custom ribbon, and one of the controls in that ribbon is this:
<gallery idMso="CustomGallery1" label="Building Blocks" size="large" />
The only other part that makes this work is the creation of entries under Custom1 in the Building Blocks Organizer. In Word 2010, this would show all the building blocks under the Custom1 category. In Word 2013, it shows the name of each building block briefly, and then all of them are removed and the list is empty:
The building blocks themselves all contain either a document property or document variable.
I have tried the following to resolve this but without success:
Ensured that they are still present by opening the template outside of Visual Studio; they are.
Upgraded the template to the 2013 dotx format.
Re-created the building blocks.
Re-created the entire dotx file, and then re-created the building blocks.
I also tried using other ribbon IDs, they are empty too (they do all have entries) but they display it differently:
There should be four entries there, they exist in my Normal.dotm. The last two controls there, for equations and content controls, do work, except the content control that is inserted displays similar behavior as the Autotext gallery:
I don't know what should be shown in this case but I doubt it's nothing.
Right now I'm assuming that this is just a broken feature in 2013 and will have to replace it with something else. Does anyone know anything to the contrary?
I don't think it is a broken feature, after some struggle, I did get to understand how to use it:
The gallery button in the "toolbar" of a newly added Building Block Gallery Content Control indeed seems empty at first, because it is set to list QuickParts. You have to change it in the properties of the control so that it lists the content of the AutoText Gallery instead (or any other Gallery of Building Blocks you'd like). To do so, either directly click on the Properties button in the Developper tab while the control is selected, or switch to Design Mode so that the Properties appears in the context menu (right-click on the control):
AutoText is "Insertion automatique" in French, the rest you can guess ;)
As far as I could find, it's just a broken feature. There's also a ridiculous memory leak the first time you do a Find and add fields during that find.

AEM: Responsive Grid does not show layout mode

I posted AEM related question in Adobe forums but I have still not able to resolve the configuration problems.
One is that I would like to show ruler and responsive emulator menu at the top of editor.html
Second is that I would like to components to have customizable with. For example, if you drop text component on a page at editor.html, you can adjust the width of the component with drugging blue dot on the side.
The original question in Adobe forum has my current configuration which is not quite working with screenshot and details.
Original question: https://forums.adobe.com/thread/2376694
Would anybody help me resolving the issue that I have?
There's several things you need to do to enable the ruler and layouting mode in AEM.
Ruler (Emulator)
make sure /libs/wcm/mobile/components/simulator/simulator.jsp is in the head of your page
register the page component with a MobileEmulatorProvider. For example:
com.day.cq.wcm.mobile.core.impl.MobileEmulatorProvider-alias.xml:
mobile.resourceTypes=[geometrixx-media/components/page]
add the cq:deviceGroup property to the root content node (i.e. /etc/mobile/groups/responsive)
Note: the ruler will not show up unless the page is treated as “responsive”. The “emulators” property must not be blank at http://localhost:4502/libs/wcm/core/content/pageinfo.json?path=<path to page>
Layouting Mode
add the cq:responsive node to the root content node (just grab it from geometrixx-media). For example:
<cq:responsive jcr:primaryType="nt:unstructured">
<breakpoints jcr:primaryType="nt:unstructured">
<phone jcr:primaryType="nt:unstructured" title="{String}Phone" width="{Decimal}768"/>
<tablet jcr:primaryType="nt:unstructured" title="{String}Tablet" width="{Decimal}1200"/>
</breakpoints>
</cq:responsive>
if not inheriting from the foundation page component, add /libs/foundation/components/page/cq:infoProviders/responsive node to page component
change the "par" parsys to be of type wcm/foundation/components/responsivegrid
include the responsive css client lib in the project (see below)
More info: https://docs.adobe.com/docs/en/aem/6-2/author/page-authoring/responsive-layout.html

Bind command to hub section header click in Windows 10 Universal App

Suppose I got a hub page (HubPageView) and a couple of hub sections inside that page e.g.
<Hub Header="{Binding AppName}">
<HubSection IsHeaderInteractive="True"
Header="Section 1">
...
</HubSection>
...
</Hub>
When rendered the above shows as "Section 1 See more" and I take it that if the user taps "See more" the app is supposed to navigate to, say, Section1PageView.
I'm trying hard to follow the MVVM pattern so I'd like to bind the tap to a command (NavigateToSection1Command) instead of using the ItemClick event - how do I accomplish this?
The Hub class has a SectionHeaderClick event to which you could attach an EventTriggerBehavior and bind your Command to it.
<Page xmlns:i="using:Microsoft.Xaml.Interactivity"
xmlns:core="using:Microsoft.Xaml.Interactions.Core"
<Hub Header="{Binding AppName}">
<i:Interaction.Behaviors>
<core:EventTriggerBehavior EventName="SectionHeaderClick">
<core:InvokeCommandAction Command="{Binding NavigateToSectionCommand}" />
</core:EventTriggerBehavior>
</i:Interaction.Behaviors>
</Hub>
</Page>
The SectionHeaderClick is the event that MS put for us to interact with the Hub Header, but the way it works will make MVVM's life harder. You see, that event passes the Section object that was clicked as an argument. You will lose that by attaching a command, as there is no built in way to pass an event argument to a command and there will be no way to tell which section the command was fired from.
That being said, I think that placing a Button or TextBlock at the HubSection's Header and attaching a EventTriggerBehavior to it`s Click event would better suit your needs.
Ps: You will have to add a Reference to the Behaviors SDK. Go to Add References > Universal Windows > Extensions, then check Behaviors SDK (XAML)

How to disable back button on report?

I am accessing report using URL like in example:
http://localhost:8080/jasperserver/flow.html?_flowId=viewReportFlow&standAlone=true&_flowId=viewReportFlow&ParentFolderUri=%2Freports%2Finteractive&reportUnit=%2Freports%2Finteractive%2FCustomersReport
I have also added custom theme to hide JasperServer decorators by folowing link: http://community.jaspersoft.com/wiki/embedding-ad-hoc-http-api
The only problem I am facing is when user click on Back button, they are exiting the report and they can see list of reports in repository. I would like to disable that behavior so that Back button just does nothing in that case. I have tried to customize the behavior as described in: http://community.jaspersoft.com/wiki/setting-default-flow-action-back-button but I can't find the proper value to replace the default action:
<end-state id="done" view="flowRedirect:searchFlow?lastMode=true" />
I have tried replacing it with
<end-state id="done" view="json:none" />
but that gave me some crazy error.
Hiding button by CSS is not a option since I need the back button to work when user is viewing sub-reports.
I did this issue for Input Control form button.
Under "...\apache-tomcat\webapps\jasperserver\WEB-INF\jsp\modules\viewReport" directory, in ViewReport.jsp file, I searched for "ICDialog" text and deleted related statements with ICDialog. Then I restarted the jasperserver by "servicerun.bat" and "servicerun.bat START" commands.
I think, this will work for back button and the others.
How about setting up the roles/users so the logged in user can only view reports allowed by that user. This would be a better solution than trying to circumvent the browser functionality. Alternatively if you have an application you are trying to embed jasper in you could use the web services to just download the report required by the user and not enable them to access the server webpage.
Simply add &decorate=no at the end of the URL.
Now the url like this {url_for_jasper_report}&decorate=no
Adding this query parameter you can hide the back button as well as the footer and header