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.
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>
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 want to have modified Customize dialog, so I created one. But I want to show this custom dialog after Welcome dialog in mondo UI.
If I do that:
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="CustomizeDlg">1</Publish>
<Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="3">1</Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="CustomCustomizeDlg" Order="4">1</Publish>
<Publish Dialog="CustomCustomizeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4">1</Publish>
<Publish Dialog="CustomCustomizeDlg" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="4">1</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="CustomCustomizeDlg" Order="4">1</Publish>
then everything works fine... but if I make something like this:
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="CustomCustomizeDlg">1</Publish>
<Publish Dialog="CustomCustomizeDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="3">1</Publish>
<Publish Dialog="CustomCustomizeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4">1</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="CustomCustomizeDlg" Order="4">1</Publish>
Then none of Customize dialog is shown, instead of that, license dialog is shown after welcome...
I did not get it at all... this behavior is strange for me... Any ideas?
EDIT:
I just discover that in msi DB is registered control event on WelcomeDlg next for CustomCustomizeDlg but also for LicenseDialog and both with order 1... if I delete row for licenseDialog it is working ok, so now my question is how to delete that row without using orca...
You don't need to delete it, just add your control event with a greater order than 1 (try 10 or so to be sure) and it will take precedence.
When more than one NewDialog is a candidate to be opened, only the one with the greatest order number will be selected. You can find a similar question answered here or here.
Additionally you can read about the events ordering in the MSDN ControlEvent table documentation:
The exception to note is that each control can publish a most one NewDialog or one SpawnDialog event. If you need to author multiple NewDialog and SpawnDialog control events in this table, also include conditional statements in the Condition fields that ensure at most one event is published. If multiple NewDialog and SpawnDialog control events are selected for the same control, only the event with the largest value in the Ordering column gets published when the control is activated.
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>
I am using Wix::Extensions::CommonUi from AppSecInc.
I need to deploy two databases in my MSI and need to collect the db connection information from the user for both databases.
I would like to utilize DbCreateCredDlg dialog.
<UI>
....
<DialogRef Id="DbCreateCredDlg" />
<!- use DbCreateCredDlg for database 1 ->
<!- use DbCreateCredDlg for database 2 ->
...
</UI>
Is there any way I can use the this dialog more than once in the same MSI?
I suppose you should pull the sources of that dialog to include in your sources and modify it accordingly. For instance, add a condition when the Next button of this dialog returns it to self for database 2 data. You'll need to preserve the data in the properties tied to dialog controls before prompting the user to enter the data for database 2.
So, the Next button will do the following (just behavior algorithm):
if DB=1, preserve entered data for database1
set DB=2
show this dialog again
if DB=2, preserve entered data for database2
show next dialog in sequence
The similar thing should be done for Back button of that dialog.
Hope you get the idea.