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'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>
I have a cfgrid set up, and it works well when sorting and returning the correct information. The problem is that when I return a longer list that extends the page, and I select a row, I skip to another area of the returned list. It still selects the row when clicked on, but will end up somewhere else on the list so that I have to scroll down to find it. I want the page to just stay where it is and still select the row like it has been. I have messed with preservedataonsort, and anything else that may be related, but with no luck. Any thoughts to accomplish this? Thanks
<cfgrid format="HTML" name="tblbaseNEWNEWGRID" query="HOMEFILTERQRY"
selectmode="" colheaderbold="true" sort="true" selectcolor="red" selectonload="no" gridlines="yes" >
<cfgridcolumn name="B" width="74" headeralign="center" dataalign="center" />
<cfgridcolumn name="W" width="159" headeralign="center" dataalign="center" />
<cfgridcolumn name="START" width="57" header="START" headeralign="center" dataalign="center" type="date" />
<cfgridcolumn name="END" width="57" header="END" headeralign="center" dataalign="center" type="date" />
<cfgridcolumn name="POH" width="57" header="POH" headeralign="center" dataalign="center" type="date" />
<cfgridcolumn name="INSTALL" width="135" header="INSTALL" headeralign="center" dataalign="center"/>
<cfgridcolumn name="ST" width="65" headeralign="center" dataalign="center"/>
<cfgridcolumn name="PREV" width="105" header="PREVIOUS REASON" headeralign="center" dataalign="center">
<cfgridcolumn name="ES" width="75" header="COMPANY" headeralign="center" dataalign="center"/>
<cfgridcolumn name="ES" width="62" header="PUM" headeralign="center" dataalign="center"/>
<cfgridcolumn name="PUM" width="65" header="SET " headeralign="center" dataalign="center" type="numeric" />
<cfgridcolumn name="ESP_D" width="48" Header="DH?" headeralign="center" dataalign="center"/>
<cfgridcolumn name="PROVING" width="48" header="PR?" headeralign="center" dataalign="center" />
<cfgridcolumn name="MOTO" width="88" header="MOTO" headeralign="center" dataalign="center"/>
<cfgridcolumn name="COMMENTS" width="88" headeralign="center" dataalign="center"/>
<cfgridcolumn name="ADDED_BY" display="NO" values="#session.AD_User#" >
<cfgridcolumn name="ADDED_DATE" display="NO" values="#now()#" >
<cfgridcolumn name="EVENT_NUM" width="50" header="EVENT NUMBER" headeralign="center" dataalign="center" select="no" />
</cfgrid>
I have updated my existing application which uses lync sdk assemblies to silverlight 5. from there onwards, the application does not compile gives out an error
The tag 'UCTreeView' does not exist in XML namespace 'clr-namespace:Microsoft.Lync.Controls;assembly=Microsoft.Lync.Controls'
I've added following references
Microsoft.Lync.Controls
Microsoft.Lync.Controls.Framework
Microsoft.Lync.Model
Microsoft.Lync.Utilities
System.Windows.Controls
Following XAML gives compile errors
<UserControl x:Class="aa.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:c="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
xmlns:controls="clr-namespace:Microsoft.Lync.Controls;assembly=Microsoft.Lync.Controls"
mc:Ignorable="d"
xmlns:Microsoft_Lync_Controls_Internal_Converters="clr-namespace:Microsoft.Lync.Controls.Internal.Converters;assembly=Microsoft.Lync.Controls"
xmlns:Microsoft_Lync_Internal_Utilities_Helpers="clr-namespace:Microsoft.Lync.Internal.Utilities.Helpers;assembly=Microsoft.Lync.Utilities"
xmlns:Microsoft_Lync_Controls_Internal="clr-namespace:Microsoft.Lync.Controls.Internal;assembly=Microsoft.Lync.Controls"
xmlns:Microsoft_Lync_Controls_Internal_Framework_Commands="clr-namespace:Microsoft.Lync.Controls.Internal.Framework.Commands;assembly=Microsoft.Lync.Controls.Framework"
d:DesignHeight="300" d:DesignWidth="400">
<UserControl.Resources>
<Style x:Key="ContactListStyle1" TargetType="controls:ContactList">
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="Microsoft_Lync_Internal_Utilities_Helpers:SetterValueBindingHelper.PropertyBindingCollection">
<Setter.Value>
<Microsoft_Lync_Internal_Utilities_Helpers:SetterValueBindingHelperCollection>
<Microsoft_Lync_Internal_Utilities_Helpers:SetterValueBindingHelper Binding="{Binding DefaultControlBackgroundBrush, Source={StaticResource ControlColors}}" Property="Background"/>
</Microsoft_Lync_Internal_Utilities_Helpers:SetterValueBindingHelperCollection>
</Setter.Value>
</Setter>
<Setter Property="IsTabStop" Value="False"/>
<Setter Property="UseLayoutRounding" Value="False"/>
<Setter Property="AllowDrop" Value="False"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:ContactList">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
<Grid x:Name="PART_ContactListGrid" Grid.Row="0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid AutomationProperties.AutomationId="PivotBar" Visibility="{Binding ShowPivotBar, Converter={StaticResource BooleanToVisibilityConverter}, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="10"/>
</Grid.RowDefinitions>
<Grid Height="26" Visibility="{Binding IsChecked, Converter={StaticResource BooleanToVisibilityConverter}, ElementName=PivotBarDivider}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Microsoft_Lync_Controls_Internal:EnterEnabledRadioButton AutomationProperties.AutomationId="ViewByGroupButton" Content="{Binding Resources.ContactListFilterGroup, Converter={StaticResource StringToAcceleratorConverter}, Source={StaticResource ResourcesWrapper}}" Grid.Column="0" GroupName="ViewByOptions" IsChecked="{Binding GroupViewBySetting, ConverterParameter=Groups, Converter={StaticResource EnumToBoolConverter}, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" IsEnabled="{Binding IsSignedIn, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ListFilterRadioButtonStyle}">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding Resources.ContactListFilterGroupToolTip, Source={StaticResource ResourcesWrapper}}" Style="{StaticResource DefaultToolTipStyle}"/>
</ToolTipService.ToolTip>
</Microsoft_Lync_Controls_Internal:EnterEnabledRadioButton>
<Microsoft_Lync_Controls_Internal:EnterEnabledRadioButton AutomationProperties.AutomationId="ViewByStatusButton" Content="{Binding Resources.ContactListFilterStatus, Converter={StaticResource StringToAcceleratorConverter}, Source={StaticResource ResourcesWrapper}}" Grid.Column="1" GroupName="ViewByOptions" IsChecked="{Binding GroupViewBySetting, ConverterParameter=Status, Converter={StaticResource EnumToBoolConverter}, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" IsEnabled="{Binding IsSignedIn, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ListFilterRadioButtonStyle}">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding Resources.ContactListFilterStatusToolTip, Source={StaticResource ResourcesWrapper}}" Style="{StaticResource DefaultToolTipStyle}"/>
</ToolTipService.ToolTip>
</Microsoft_Lync_Controls_Internal:EnterEnabledRadioButton>
<Microsoft_Lync_Controls_Internal:EnterEnabledRadioButton AutomationProperties.AutomationId="ViewByRelationshipButton" Content="{Binding Resources.ContactListFilterRelationship, Converter={StaticResource StringToAcceleratorConverter}, Source={StaticResource ResourcesWrapper}}" Grid.Column="2" GroupName="ViewByOptions" IsChecked="{Binding GroupViewBySetting, ConverterParameter=Relationship, Converter={StaticResource EnumToBoolConverter}, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" IsEnabled="{Binding IsSignedIn, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ListFilterRadioButtonStyle}">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding Resources.ContactListFilterRelationshipToolTip, Source={StaticResource ResourcesWrapper}}" Style="{StaticResource DefaultToolTipStyle}"/>
</ToolTipService.ToolTip>
</Microsoft_Lync_Controls_Internal:EnterEnabledRadioButton>
<Microsoft_Lync_Controls_Internal:SplitButton x:Name="PART_ViewLayoutMenu" AutomationProperties.AutomationId="ViewLayoutMenu" Grid.Column="3" HorizontalAlignment="Right" Height="22" IsEnabled="{Binding IsSignedIn, RelativeSource={RelativeSource TemplatedParent}}" Padding="2,0,2,0" Style="{StaticResource SplitButtonControlTertiaryStyle}" VerticalAlignment="Center">
<Microsoft_Lync_Controls_Internal:SplitButton.DropDown>
<Microsoft_Lync_Controls_Internal:ContextMenu>
<Microsoft_Lync_Controls_Internal:RadioMenuItem x:Name="PART_OneLineMenuItem" AutomationProperties.AutomationId="OneLineRadioButton" GroupName="LineViewGroup" Header="{Binding Resources.ContactListViewOneLine, Converter={StaticResource StringToAcceleratorConverter}, Source={StaticResource ResourcesWrapper}}">
<Microsoft_Lync_Controls_Internal:RadioMenuItem.Icon>
<ContentControl Style="{StaticResource IconStyle.OneLineView}"/>
</Microsoft_Lync_Controls_Internal:RadioMenuItem.Icon>
</Microsoft_Lync_Controls_Internal:RadioMenuItem>
<Microsoft_Lync_Controls_Internal:RadioMenuItem x:Name="PART_TwoLinesMenuItem" AutomationProperties.AutomationId="TwoLinesRadioButton" GroupName="LineViewGroup" Header="{Binding Resources.ContactListViewTwoLine, Converter={StaticResource StringToAcceleratorConverter}, Source={StaticResource ResourcesWrapper}}">
<Microsoft_Lync_Controls_Internal:RadioMenuItem.Icon>
<ContentControl Margin="0,1,0,0" Style="{StaticResource IconStyle.TwoLineView}"/>
</Microsoft_Lync_Controls_Internal:RadioMenuItem.Icon>
</Microsoft_Lync_Controls_Internal:RadioMenuItem>
<Microsoft_Lync_Controls_Internal:MenuItem Header="{Binding Resources.ContactListViewShowFriendlyName, Converter={StaticResource StringToAcceleratorConverter}, Source={StaticResource ResourcesWrapper}}" IsCheckable="True" IsChecked="{Binding ShowFriendlyName, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
<Microsoft_Lync_Controls_Internal:MenuItem IsTabStop="False" IsEnabled="False" Style="{StaticResource MenuItemSeparatorStyle}"/>
<Microsoft_Lync_Controls_Internal:RadioMenuItem x:Name="PART_SortByDisplayNameMenuItem" GroupName="SortByGroup" Header="{Binding Resources.ContactListViewDisplayName, Converter={StaticResource StringToAcceleratorConverter}, Source={StaticResource ResourcesWrapper}}"/>
<Microsoft_Lync_Controls_Internal:RadioMenuItem x:Name="PART_SortByAvailabilityMenuItem" GroupName="SortByGroup" Header="{Binding Resources.ContactListViewAvailability, Converter={StaticResource StringToAcceleratorConverter}, Source={StaticResource ResourcesWrapper}}"/>
<Microsoft_Lync_Controls_Internal:MenuItem IsTabStop="False" IsEnabled="False" Style="{StaticResource MenuItemSeparatorStyle}"/>
<Microsoft_Lync_Controls_Internal:MenuItem Header="{Binding Resources.ContactListViewShowFrequentContacts, Converter={StaticResource StringToAcceleratorConverter}, Source={StaticResource ResourcesWrapper}}" IsCheckable="True" IsChecked="{Binding ShowFrequentContacts, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
</Microsoft_Lync_Controls_Internal:ContextMenu>
</Microsoft_Lync_Controls_Internal:SplitButton.DropDown>
<Microsoft_Lync_Controls_Internal:SplitButton.LeftToolTip>
<ToolTip Content="{Binding Resources.ToolTipContactListLayoutMenuLeft, Source={StaticResource ResourcesWrapper}}" Style="{StaticResource DefaultToolTipStyle}"/>
</Microsoft_Lync_Controls_Internal:SplitButton.LeftToolTip>
<Microsoft_Lync_Controls_Internal:SplitButton.RightToolTip>
<ToolTip Content="{Binding Resources.ToolTipContactListLayoutMenuRight, Source={StaticResource ResourcesWrapper}}" Style="{StaticResource DefaultToolTipStyle}"/>
</Microsoft_Lync_Controls_Internal:SplitButton.RightToolTip>
<Grid>
<ContentControl Style="{StaticResource IconStyle.OneLineView}" Visibility="{Binding IsChecked, Converter={StaticResource BooleanToVisibilityConverter}, ElementName=PART_OneLineMenuItem, FallbackValue=Collapsed, Mode=OneWay}"/>
<ContentControl Style="{StaticResource IconStyle.TwoLineView}" Visibility="{Binding IsChecked, Converter={StaticResource NotBooleanToVisibilityConverter}, ElementName=PART_OneLineMenuItem, Mode=OneWay}"/>
</Grid>
</Microsoft_Lync_Controls_Internal:SplitButton>
</Grid>
<ToggleButton x:Name="PivotBarDivider" AutomationProperties.AutomationId="PivotBarDivider" Height="10" IsChecked="True" AutomationProperties.Name="Pivot bar divider" Grid.Row="1" Style="{StaticResource ToggleButtonPivotDividerStyle}"/>
</Grid>
<controls:UCTreeView x:Name="PART_TreeControl" ContextualInformation="{TemplateBinding ContextualInformation}" ContactLayoutView="{TemplateBinding ContactLayoutView}" GroupViewBySetting="{TemplateBinding GroupViewBySetting}" HorizontalContentAlignment="Stretch" ScrollViewer.HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" ItemsSource="{TemplateBinding Contacts}" IsEnabled="{TemplateBinding IsSignedIn}" Grid.Row="1" ShowFriendlyName="{TemplateBinding ShowFriendlyName}" ScrollViewer.VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" Style="{StaticResource UCTreeViewStyle1}"/>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>
<Grid x:Name="LayoutRoot" Background="White">
</Grid>
</UserControl>
I've bad news for you. Lync 2010 needs and require Silverlight 4 SDK, it was created for that version. For example, if you try install Lync 2010 AFTER Silverlight 5 Tools, you need to do a downgrade. Otherwise you will find bugs, and bugs, and conflicts, and conflicts, for ever.
Try with this thread: http://social.msdn.microsoft.com/Forums/en-US/communicationsserversdk/thread/85f3990a-de73-4ed2-b6c2-f515a9a8fec5