I`m having trouble finding out how to change the value of a checkbox (=property) on deselect.
What I`ve got this far:
<Property Id="INSTALLEXCEL2007" />
<Control Type="CheckBox" Id="Excel2007_Checkbox" Width="88" Height="17" X="22" Y="120" Text="Excel 2007" Property="INSTALLEXCEL2007" CheckBoxValue="1" />
The code says that the property INSTALLEXCEL2007 will get the value 1, if the user checks it.
Now, if it is unchecked, the value still remains 1. Meaning, each click on the checkbox assigns the value 1 to this property.
Is there any way to have a "unchecked value"?
I have already tried this, but it didn`t work in my case.
If user unselects the Checkbox the property will be deleted or it value goes to null. You can use the uncheck condition like below.
INSTALLEXCEL2007 <> 1
If you test the Checkbox property value(check and uncheck) in dialog using text control, it won’t get updated. You need to publish the property or if you click next or back button, it will be updated.
After hours of trying to get it done with checkboxes, I`ve switched to combo boxes.
It has been really easy to use them, though its not as a pretty as it would have been with checkboxes.
Here`s an example of one of my combo boxes (maybe someone might find it useful):
<Control Type="ComboBox" Id="Excel2007_Combobox" Width="75" Height="14" X="165" Y="114" ComboList="yes" Property="INSTALLEXCEL2007">
<ComboBox Property="INSTALLEXCEL2007">
<ListItem Text="No" Value="0" />
<ListItem Text="Yes" Value="1" />
</ComboBox>
</Control>
After selecting a value, it`s easy to use the value of the property "INSTALLEXCEL2007" as a condition:
<Publish Dialog="ExcelChooserDlg" Control="ExcelChooser_Accept" Event="SpawnDialog" Value="WarningDlg_NoOfficeVersion" Order="1"><![CDATA[INSTALLEXCEL2007<>"1"]]></Publish>
Related
In my RadDataGrid, I have to use a DataGridTemplateColumn because the Itemssource of my combobox is a collection that is a property of the object represented by the grid row. I've got it working except for the fact that the combo box is always editable. In other words, the box and dropdown arrow are always visible. In the screen shot below, the first column is a DataGridComboBoxColumn. The second is a DataGridTemplateColumn. Neither column has been clicked. (Note the column headings are not in the shot.)
In a regular combobox column on a RadDataGrid the combo box is not visible unless you double click on the column. Until you click, the column just displays the selected item. In my columns, the box and dropdown arrow are always visible, before and after you click in or out of the column.
How can I change this to the typical behavior? I want the user to have to click in the column before the box and dropdown arrow become visible. Before that, the column just display the selected item. Here is my code:
<tg:DataGridTemplateColumn SizeMode="Auto">
<tg:DataGridTemplateColumn.CellContentTemplate>
<DataTemplate>
<ComboBox Width="220"
ItemsSource="{Binding Path=ItemCategory.Items, Mode=OneWay}"
SelectedItem="{Binding Products, Mode=TwoWay}"
SelectedValue="{Binding Products.Id, Mode=OneWay}"
SelectedValuePath="Id"
DisplayMemberPath="ItemName">
</ComboBox>
</DataTemplate>
</tg:DataGridTemplateColumn.CellContentTemplate>
<tg:DataGridTemplateColumn.Header>
<TextBlock.Text = "Item Category"/>
</tg:DataGridTemplateColumn.Header>
</tg:DataGridTemplateColumn>
Is it possible to clear a picked date in CalendarDatePicker control in XAML? I have the following code:
<StackPanel Orientation="Horizontal" Margin="10" Spacing="32">
<TextBlock x:Name="date_identified_label" Text="Identified:">
</TextBlock>
<CalendarDatePicker x:Name="date_identified_picker">
</CalendarDatePicker>
</StackPanel>
This will help me resetting the date after the control is disabled and enabled again. Otherwise when I disable and then enable it again the old date is still shown.
You need to create a property and wire it to "Date" on your calendar control like below
<CalendarDatePicker x:Name="date_identified_picker"
Date="{Binding yourPropertyName,Mode=TwoWay}" />
and also in order to clear calendar date you need to explicitly Set your Calendar Date property to null whenever you are disabling your control. so that whenever your control is re-enabled, it will allow you to select a date again
How do I localize the PickerFlyoutBase.Title of a ComboBox in the Resources.resw language resource file in WP 8.1?
<ComboBox x:Uid="myUid" PlaceholderText="Some Text" PickerFlyoutBase.Title="Changed Text">
<ComboBoxItem Content="a"/>
</ComboBox>
PickerFlyoutBase.Title is the text to replace the CHOOSE AN ITEM text on the flyout.
I had real trouble with this and finally with some support which led me in the right direction I managed to get the syntax correct, this is entered in the Name column of the Resources.resw file.
myUid.[using:Windows.UI.Xaml.Controls.Primitives]PickerFlyoutBase.Title
I have a WIX Project consisting of some wxs files.In my one wxs file namely "DBFile" I want to hide one label say "lbl" at runtime depending upon the Properties.
i.e. If my property say "IsDbExists" is true then i want to show label "lbl" otherwise it should be hidden.
How can i achieve this?
Like this:
<Control Id="LoginTextBox" Type="Edit" ...>
<Condition Action="hide" >IsDbExists<>1</Condition>
<Condition Action="show" >IsDbExists=1</Condition>
</Control>
I have a Wix Control PushButton which has several Publish events
here is the xml
<Control Id="Next" Type="PushButton" X="0" Y="0" Width="50" Height="20" Default="yes" Text="!(loc.WixUINext)">
<Publish Event="SpawnDialog" Value="ErrorDialog">
<![CDATA[PROPERTY1 = "1" AND PROPERTY2 = "1"]]>
</Publish>
</Control>
But the dialog is not appearing even though both properties are equal to 1
I Found the problem pretty much straight after i posted. So am putting it here incase anyone else makes the same mistake i did.
Straight after my publish event i had another event which was getting fired to move onto the next dialog screen
<Publish Event="NewDialog" Value="CustomizeDlg">1</publish>
so even though my error dialog should show, this next event sort of overwrites it and you dont get to see it. to stop this happening i had to write in logic to prevent it from moving on.
<Publish Event="NewDialog" Value="CustomizeDlg">
<![CDATA[PROPERTY1 = "1" AND PROPERTY2 = "0"]]></Publish>
so now if both properties have been set it will show the error dialog, but if only the first one has been set i will move straight onto the CustomizeDlg. As long as the conditions are different and one will fail and the other pass this works a charm.