How change the control language? - wpf-extended-toolkit

I'm using wpf-extended-toolkit 'cause wpf doesn't have any ColorPicker. But I noticed that there is no support for the multilanguage, in particular the control is in english, I want change the label "Available Colors", "Standards Colors" and "Advanced" in italian language..
Someone know how do this?

The "Available Colors" and Standard Colors" labels, as well as the "Advanced" and "Standard" button labels, can all be modified using the following properties on the ColorPicker: AvailableColorsHeader, StandardColorsHeader, StandardButtonHeader and AdvancedButtonHeader.
I used Google Translate, so my apologies if any of the translations are off.
<xctk:ColorPicker x:Name="italianColorPicker"
Margin="20" Width="100" Height="25"
AvailableColorsHeader="Colori disponibili"
StandardColorsHeader="Colori standard"
StandardButtonHeader="Standard"
AdvancedButtonHeader="Avanzate" />

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.

When designing a template, how can I create a dummy text, like those in Microsoft's original templates?

You know Microsoft's templates for Word, like the CV templates or formal letter templates etc. Those templates have dummy text like "You can edit this section bla bla..."
I'm designing a template for my friends to use. I want to add a paragraph that can be edited with a single click. How can I do that?
This is what I'm trying to say (gif): https://s8.gifyu.com/images/gif37fd08f069cff363.gif
I've tried using "MacroButton noname [Text]" but it doesn't allow using text longer than 1 line.
Microsoft templates use Content Controls (on the Developer tab). Using either a Rich Text or Plain Text CC, open the Properties dialog and set the Show as dropdown to None and check the option beside Remove content control when contents are edited.
Now the tricky part: making the entire paragraph selected when you click on it. You can't set this with the Properties dialog. Instead you have to edit the XML, adding the line with the comment beside it:
<w:sdt>
<w:sdtPr>
<w:id w:val="1781998595"/>
<w:placeholder>
<w:docPart w:val="A97E97C2665C45749484CCB99C007209"/>
</w:placeholder>
<w:temporary/>
<w:showingPlcHdr/><!--Add this line to the XML to make text get selected with single click-->
<w15:appearance w15:val="hidden"/>
</w:sdtPr>
<w:sdtContent>
<w:p w14:paraId="5C4F7F28" w14:textId="240370F5" w:rsidR="005B3871" w:rsidRDefault="005B3871" w:rsidP="005B3871">
<w:r>
<w:t>Video provides a powerful way to help you prove your point. When you click Online Video, you can paste in the embed code for the video you want to add. You can also type a keyword to search online for the video that best fits your document.</w:t>
</w:r>
</w:p>
</w:sdtContent>
</w:sdt>
Here's my introduction to editing OOXML: OOXML Hacking: An Introduction

XPages Typeahead autocomplete behavior

In XPages Mobile controls I'm having a problem with Typeahead. Actually I think the behavior changed recently - maybe with the last update of the Ext. Library but I'm not sure. Thats when we noticed the change by the way. Is has been working as desired.
Below are 2 screenshots. The first one is on a normal XPage and the second is inside Mobile Controls.
Notice how the user starts typing a "D" in the first one there's no "autocomplete". But in the second screenshot the user typed a "D" and it immediately added in the first value which in this case starts with an "O". It replaced the "D" that the user typed.
(The fact that the record with the beginning "O" is showing is working as designed, so ignore that.)
The problem is I don't want that autocomplete happening at all. I want the behavior of the first screenshot inside mobile controls. so the user can keep typing and it'll will continue to filter the list and not overwrite what the user entered.
I'm fairly certain it used to do that and I don't know what changed. The code itself did not change - that I know.
I've attempted to set autocomplete and autocorrect to "off" without any luck. I'm not sure what the difference is or if they even truly come into play.
How can I get the field to not auto-fill inside of Mobile Controls?
Any advice would be appreciated. I should note that this is privately going to be used on iPads. So it's the Mobile Safari browser.
Thanks!
Here is the basic code for this:
<xp:inputText id="inputJobCode" value="#{viewScope.selectedJob}"
styleClass="target span9">
<xp:this.attrs>
<xp:attr name="placeholder" value="Job Code" />
<xp:attr name="autocorrect" value="off" />
<xp:attr name="autocomplete" value="off" />
</xp:this.attrs>
<xp:this.dojoAttributes>
<xp:dojoAttribute name="autocorrect" value="off" />
<xp:dojoAttribute name="autocomplete" value="off" />
</xp:this.dojoAttributes>
<xp:typeAhead mode="partial" minChars="1" valueMarkup="true"
var="searchValue" valueList="#{javascript:return com.companyname.datahub.TypeAhead.jobTypeAhead(searchValue);}">
</xp:typeAhead>
<xp:eventHandler event="onchange" submit="true"
refreshMode="complete">
<xp:this.action><![CDATA[#{javascript:var key:String = viewScope.get("selectedJob");
getComponent("inputJobCode").setValue("");
//JobData.load(key);
}]]></xp:this.action>
</xp:eventHandler>
</xp:inputText>
Here is what the output HTML is from the mobile control page:
<input type="text" id="view:_id1:checkOutFacilityID_content:_id4:inputText5"
name="view:_id1:checkOutFacilityID_content:_id4:inputText5" autocomplete="off"
class="mblTextBox target" placeholder="Job Code" autocorrect="off"
dojotype="extlib.dijit.mobile.TypeAheadCombo"
store="view__id1_checkOutFacilityID_content__id4__id9" data-dojo-
props="list:'view__id1_checkOutFacilityID_content__id4__id9', searchAttr:'value',
labelAttr:'label', labelType:'html'" spellcheck="false" tabindex="0" lang="en"
widgetid="view:_id1:checkOutFacilityID_content:_id4:inputText5" value="">
I got an answer for this from the Maire at IBM.
There was a change made in a recent Ext. Library update regarding Type Ahead. The solution for now is to use dojo to add a setting. Here's the email that IBM sent me.
Hi David,
The mobile typeAhead behavior changed in the release 901v00_04.20140226-1506
For details of the changes, see the section "Improvements to XPages TypeAhead control support" in the readme.pdf for that release.
I'm reproducing the behavior you're talking about, and I've logged an SPR:
SPR#MKEE9L7E9BLink XPages, Mobile TypeAhead, first item in the dropdown is being inserted into the edit box (should not be)
To workaround the issue:
The workaround is to write a script changing the edit box behavior,
so insert this control into your XPage, and change the name inputText1 to match your edit box's name:
<xp:panel id="panel1">
<xp:eventHandler event="onClientLoad" submit="false">
<xp:this.script><![CDATA[dijit.byId('#{id:inputText1}').autoComplete=false;/*Note autoComplete=false is different to autocomplete=off*/ ]]></xp:this.script>
</xp:eventHandler>
</xp:panel>
Regards,
Maire
I note the dojoType added to mobile - dojotype="extlib.dijit.mobile.TypeAheadCombo". It sounds like that makes it a mixture of a combo box and typeahead, which explains the functionality you're seeing.
Does it work if you add that Dojo Attribute to the non-mobile one?

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

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

iPhone - initWithBarButtonSystemItem and language translation

I use initWithBarButtonSystemItem to place some buttons in my navigationbar, but I am surprised with something : the text is not translated in the local language...
My keyboard "accept" text is in French, but UIBarButtonSystemItemSave keeps showing "Save" (in English) instead of something like "Enregistrer" or "Sauvegarder" (in French).
Is this normal ?
If yes, why use those kind of buttons instead of initWithTitle ones ?
I found the solution of the problem.
To make the translation work, you must define the languages to your project : Go to the project properties, and in the info tab, add the desired languages. Then, the System buttons will be localised on systems that use those languages. if you just let "English" as the sole language, for exemple, the System buttons won't be translated even if the app is launched on a Spanish, or French OS.