I'm using a custom template with views inside on a ListView, but what happens is that the click do not work. I tried to disable touchEnabled on all views inside and still nothing.
In the example below and in the attachment that I am including, there are two ListViews, one with a template with Views inside, and another ListView with a template with no Views inside.
Tested on emulator iOS 10.0.0
[index.xml]
<Alloy>
<Window class="container" layout="vertical">
<Label text="Click is not working on a template with views inside (tested iOS 10.0.0)" top="30"/>
<ListView id="list1" defaultItemTemplate="temp1" height="200" allowsSelection="false" separatorColor="transparent" top="10" onItemClick="testClick">
<Templates>
<ItemTemplate name="temp1" onClick="testClick">
<View backgroundColor="blue">
<View backgroundColor="red" width="60%" height="90%">
<Label bindId="label1"/>
</View>
</View>
</ItemTemplate>
</Templates>
<ListSection headerTitle="Click DON'T WORK!" fontSize="12">
<ListItem label1:text="01" />
<ListItem label1:text="02" />
<ListItem label1:text="03" />
</ListSection>
</ListView>
<ListView id="list2" defaultItemTemplate="temp2" height="200" allowsSelection="false" separatorColor="transparent">
<Templates>
<ItemTemplate name="temp2" onClick="testClick" >
<View backgroundColor="cyan">
</View>
</ItemTemplate>
</Templates>
<ListSection headerTitle="Click WORKS!">
<ListItem />
<ListItem />
<ListItem />
</ListSection>
</ListView>
</Window>
[index.js]
function testClick() {
alert('CLICK');
}
$.index.open();
Download the project if you need:
https://www.dropbox.com/s/t3h6mchsb0e5bdh/ListViewBugTemplateClick.zip?dl=0
You need to use onItemclick the C is lowercase, and it should work but remove this onClick<ItemTemplate name="temp1" onClick="testClick">
<ListView id="list1" defaultItemTemplate="temp1" height="200" separatorColor="transparent" top="10" onItemclick="testClick">
<Templates>
<ItemTemplate name="temp1">
<View backgroundColor="blue">
<View backgroundColor="red" width="60%" height="90%">
<Label bindId="label1"/>
</View>
</View>
</ItemTemplate>
</Templates>
<ListSection headerTitle="Click DON'T WORK!" fontSize="12">
<ListItem label1:text="01" label1:touchEnabled="false" label1:touchable="false" />
<ListItem label1:text="02"/>
<ListItem label1:text="03" />
</ListSection>
</ListView>
Related
I have a template with this markup
`
<Styles xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:AMIS_S01.Views.Templates">
<Design.PreviewWith>
<controls:ReportsTemplate />
</Design.PreviewWith>
<Style Selector="controls|ReportsTemplate">
<!-- Set Defaults -->
<Setter Property="Template">
<ControlTemplate>
<Panel>
<DatePicker DayVisible="False" MonthFormat="MM" SelectedDateChanged="SelectedDateXmls"
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="180 8 0 0"/>
</Panel>
</ControlTemplate>
</Setter>
</Style>
</Styles>
`
The SelectedDateChanged has such a mistake: enter image description here
How do I create a template and bind this field to it, and what should I do if there are many such properties?
I expected the property "SelectedDateChanged" to take the name "SelectedDateXmls" without any problems and join correctly at runtime
I'm using WiX to create a custom dialog/page in my installer, based on WixUI_Mondo. The custom dialog has edit controls, similar to this:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<UI>
<Dialog Id="ConfigDlg" Width="370" Height="270" Title="!(loc.SetupTypeDlg_Title)" >
<Control Id="idTxt11" Type="Text" X="20" Y="65" Width="60" Height="16" Text="Name:" />
<Control Id="idEdt11" Type="Edit" X="90" Y="60" Width="120" Height="20" Default="yes" Property="PROP_NAME" />
<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" />
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Text="!(loc.WixUINext)" />
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
<Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
</Control>
</Dialog>
</UI>
</Fragment>
</Wix>
I can read those controls from my custom action DLL (written in C++) when the Next button is clicked, by invoking it as such:
<Publish Dialog="ConfigDlg" Control="Next" Event="DoAction" Value="idCA_NextBtn">1</Publish>
but I also need to pre-populate those edit boxes when the page is first shown (by reading these values from the registry). This may be needed if someone is upgrading or repairing my software.
The question is, how do I do that from my custom action?
For each property that you need read from the registry (for upgrades/repairs) just add a <RegistrySearch> element that populates those properties.
I am trying to adjust the Bug forms "Severity" to have a new custom field value on creation of "new" (currently it shows 3 of a 1 to 5 choice) however I cant find any specific examples of how to do this , e.g. https://learn.microsoft.com/en-us/vsts/work/customize/add-modify-wit does not go into detail We want to explicitly show that the severity has not explicitly been set yet.
=> Tips or Urls please ?
Below is the default content from a "witadmin exportprocessconfig" command. I am on TFs 2017 up3
<BugWorkItems category="Microsoft.BugCategory" pluralName="Bugs" singularName="Bug">
<States>
<State type="Proposed" value="New" />
<State type="Proposed" value="Approved" />
<State type="InProgress" value="Committed" />
<State type="Complete" value="Done" />
</States>
You need to modify the Bug.xml file to add a new LISTITEM in Severity field rule. Check the example below:
<FieldDefinition name=" refname="Microsoft.VSTS.Common.Severity" type="String" reportable="dimension">
<DEFAULT from="value" value="3 - Medium" />
<ALLOWEDVALUES expanditems="true">
<LISTITEM value="1 - Critical" />
<LISTITEM value="2 - High" />
<LISTITEM value="3 - Medium" />
<LISTITEM value="4 - Low" />
<LISTITEM value="5 - NewCustom" />
</ALLOWEDVALUES>
</FieldDefinition>
I am trying to create new document library from SharePoint project template from Visual Studio 2015.
While doing so I am able to create Document Library Template and Instance. Also if I deploy solution to one of my site it creates list as well. Strange thing is if I add a column to the template and then deploy it creates the list but does not create new custom column.
Below is the schema file for the template.
<?xml version="1.0" encoding="utf-8"?>
<List xmlns:ows="Microsoft SharePoint" Title="SharedDocuments" Direction="$Resources:Direction;" Url="SharedDocuments" BaseType="1" xmlns="http://schemas.microsoft.com/sharepoint/" EnableContentTypes="TRUE">
<MetaData>
<ContentTypes>
<ContentType ID="0x0101000dba2955561e4de0a115152637e9f8e2" Name="ListFieldsContentType">
<FieldRefs>
<FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" />
<FieldRef ID="{4b1bf6c6-4f39-45ac-acd5-16fe7a214e5e}" Name="TemplateUrl" />
<FieldRef ID="{cd1ecb9f-dd4e-4f29-ab9e-e9ff40048d64}" Name="xd_ProgID" />
<FieldRef ID="{fbf29b2d-cae5-49aa-8e0a-29955b540122}" Name="xd_Signature" />
<FieldRef ID="{e52012a0-51eb-4c0c-8dfb-9b8a0ebedcb6}" Name="Combine" />
<FieldRef ID="{5d36727b-bcb2-47d2-a231-1f0bc63b7439}" Name="RepairDocument" />
<FieldRef ID="{8f838bdc-4b95-4b26-b86f-3025d2df964f}" Name="TestColumn" />
</FieldRefs>
</ContentType>
<ContentTypeRef ID="0x0101">
<Folder TargetName="Forms/Document" />
</ContentTypeRef>
<ContentTypeRef ID="0x0120" />
</ContentTypes>
<Fields>
<Field ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Type="Text" Name="Title" ShowInNewForm="FALSE" ShowInFileDlg="FALSE" DisplayName="$Resources:core,Title;" Sealed="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Title"></Field>
<Field ID="{4b1bf6c6-4f39-45ac-acd5-16fe7a214e5e}" Type="Text" Name="TemplateUrl" DisplaceOnUpgrade="TRUE" DisplayName="$Resources:core,Template_Link;" XName="TemplateUrl" Filterable="TRUE" Sortable="TRUE" Hidden="TRUE" FromBaseType="TRUE" PITarget="mso-infoPathSolution" PIAttribute="href" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="TemplateUrl"></Field>
<Field ID="{cd1ecb9f-dd4e-4f29-ab9e-e9ff40048d64}" Type="Text" Name="xd_ProgID" DisplaceOnUpgrade="TRUE" DisplayName="$Resources:core,Html_File_Link;" XName="ProgID" Filterable="TRUE" Sortable="TRUE" Hidden="TRUE" FromBaseType="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="xd_ProgID"></Field>
<Field ID="{fbf29b2d-cae5-49aa-8e0a-29955b540122}" Type="Boolean" Group="_Hidden" Name="xd_Signature" DisplaceOnUpgrade="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="xd_Signature" DisplayName="$Resources:core,Xml_signed;" XName="{FBF29B2D-CAE5-49aa-8E0A-29955B540122}" Filterable="TRUE" Sortable="TRUE" Sealed="TRUE" Hidden="TRUE" FromBaseType="TRUE" ReadOnly="TRUE"></Field>
<Field ID="{e52012a0-51eb-4c0c-8dfb-9b8a0ebedcb6}" ReadOnly="TRUE" Type="Computed" Name="Combine" DisplaceOnUpgrade="TRUE" DisplayName="$Resources:core,Merge;" Filterable="FALSE" Sortable="FALSE" Hidden="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Combine">
<FieldRefs>
<FieldRef Name="FSObjType" Key="Primary" />
<FieldRef Name="EncodedAbsUrl" />
<FieldRef Name="TemplateUrl" />
</FieldRefs>
</Field>
<Field ID="{5d36727b-bcb2-47d2-a231-1f0bc63b7439}" ReadOnly="TRUE" Type="Computed" Name="RepairDocument" DisplaceOnUpgrade="TRUE" DisplayName="$Resources:core,Relink;" Filterable="FALSE" Sortable="FALSE" Hidden="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="RepairDocument">
<FieldRefs>
<FieldRef Name="FSObjType" Key="Primary" />
<FieldRef Name="ID" />
</FieldRefs>
</Field>
<Field Name="TestColumn" ID="{8f838bdc-4b95-4b26-b86f-3025d2df964f}" DisplayName="TestColumn" Type="Text" />
</Fields>
<Views>
--Removed--
</Views>
<Forms>
<Form Type="DisplayForm" SetupPath="pages\form.aspx" Url="Forms/DispForm.aspx" WebPartZoneID="Main" />
<Form Type="EditForm" SetupPath="pages\form.aspx" Url="Forms/EditForm.aspx" WebPartZoneID="Main" />
<Form Type="NewForm" Url="Forms/Upload.aspx" WebPartZoneID="Main" />
--Removed--
</Forms>
</MetaData>
</List>
When you upload a document in a Document Library there's an option for you to choose the Content Type, choose your custom Content Type and you'll see the fields you defined.
I am trying to add a new string field (IterationCompleted) to the bug work item in tfs2010. Using the TFS 2010 power tools I edited the work item adding the new field. This results in the following XML
<FieldDefinition reportable="dimension" refname="DevX.IterationCompleted" name="Iteration Completed" type="String">
<ALLOWEDVALUES>
<GLOBALLIST name="Iterations" />
</ALLOWEDVALUES>
<ALLOWEXISTINGVALUE />
<DEFAULT from="value" value="∞" />
</FieldDefinition>
I added it to the form next to some related fields. Here is the relevant XML
<Group Label="Classification">
<Column PercentWidth="100">
<Control FieldName="System.AreaPath" Type="WorkItemClassificationControl" Label="&Area:" LabelPosition="Left" />
<Control FieldName="System.IterationPath" Type="WorkItemClassificationControl" Label="Ite&ration Found:" LabelPosition="Left" />
<Control FieldName="DevX.IterationCompleted" Type="FieldControl" Label="Iteration Resolved:" LabelPosition="Left" Name="IterationCompleted" />
<Control FieldName="DevX.Customer" Type="FieldControl" Label="Customer:" LabelPosition="Left" />
<Control FieldName="DevX.ReleaseNotes" Type="FieldControl" Label="Include in Release Notes:" LabelPosition="Left" />
<Control FieldName="DevX.Billable" Type="FieldControl" Label="Billable:" LabelPosition="Left" Name="Billable" />
</Column>
</Group>
It is not involved in the workflow at all.
The problem I'm having is in the form. For new bugs, the field appears as expected and is editable (Iteration Resolved):
For old bugs however, the field is not editable. In fact there is no control at all there to input anything:
I found a similar question with an accepted answer to make sure the field is String and that on the Form the type is set to FieldControl. As you can see I have done that and still get the results I am seeing above. I have successfully added fields in the past and never encountered this problem. Does anyone know what I can do to get this field editable in old bugs?
I came across the same behaviour... Or at least similar...
I had to add default values for all the lists..
When I did not have a default value, any WIT's which had already been created could not have there values set, as it was not a ALLOWEDVAULES LISTITEM...
(Note: This code/XML changes the value of a list depending on the state of the WIT)
Sample:
<FIELD reportable="dimension" refname="GovDept.ActionRequiredTFS" name="Action Reqd TFS" type="String">
<WHEN field="System.State" value="Proposed">
<ALLOWEDVALUES>
<LISTITEM value="Assess" />
<LISTITEM value="Prioritize" />
</ALLOWEDVALUES>
<DEFAULT from="value" value="Assess" />
</WHEN>
<WHEN field="System.State" value="Active">
<ALLOWEDVALUES>
<LISTITEM value="IA Complete" />
<LISTITEM value="Impact" />
<LISTITEM value="Implement" />
<LISTITEM value="Migrate" />
<LISTITEM value="Unit Test" />
<LISTITEM value="Fix Fail" />
</ALLOWEDVALUES>
<DEFAULT from="value" value="Impact" />
</WHEN>
<WHEN field="System.State" value="Resolved">
<ALLOWEDVALUES>
<LISTITEM value="Test" />
<LISTITEM value="Fix Fail" />
</ALLOWEDVALUES>
<DEFAULT from="value" value="Test" />
</WHEN>
<ALLOWEXISTINGVALUE />
</FIELD>
End of Sample
I just had this problem in TFS 2010 using VS2012.
Steps to reproduce:
Create custom field type:String
Add field to layout, ensure it is a FieldControl
Preview Form: Works fine
Go to a query and double click and existing work item of the type you are editing
(for me it was a Backlog Item.)
Observe no proper way to edit field, even if cursor shows in field. Appears to be read only.
After verifying the field was not read only (Property false in layout), I restarted Visual Studio after saving the edits.
That cleared the issue and the edit control started working normally. I can reproduce this over and over.
Dustin,
We have never heard of this behavior. If you want Microsoft to take a look at this issue, you can file a bug at https://connect.microsoft.com/visualstudio
Ewald Hofman
TFS Program Manager