I have a popup in my application which is activated by a change in selected value of a combobox.
It works fine when I debug in VS 2010 but it doesn’t fire when I use the .exe on the same computer.
Is there an additional property of the popup I should use to make it stay on when using .exe?
private void trigger_mode_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
MODE = trigger_mode.SelectedValue.ToString();
switch (Convert.ToString(trigger_mode.SelectedValue))
{
case "triggerModeData":
Popup_data.Placement = System.Windows.Controls.Primitives.PlacementMode.Mouse;
Popup_data.StaysOpen = false;
Popup_data.Height = 200;
Popup_data.Width = 250;
Popup_data.IsOpen = true;
break;
case "triggerModeRepeat":
Popup_repeat.Placement = System.Windows.Controls.Primitives.PlacementMode.Mouse;
Popup_repeat.StaysOpen = false;
Popup_repeat.Height = 200;
Popup_repeat.Width = 250;
Popup_repeat.IsOpen = true;
break;
}
}
XAML code
<Popup x:Name="Popup_repeat" AllowsTransparency="True">
<StackPanel Background="BurlyWood">
<TextBlock TextWrapping="Wrap" Name ="T1" Text="Please enter the time interval between triggers in milliseconds"/>
<TextBox Name="T2" Text="Enter value here" KeyDown="T2_KeyDown"/>
<TextBlock TextWrapping="Wrap">
<TextBlock.Text>
Detail - In the trigger repeat the camera is triggered periodically with a specific time interval.
Please enter the time between each triggers in the textbox above by first deletign the line 'Enter value here'
and put the time interval value in milliseconds.
</TextBlock.Text>
</TextBlock>
</StackPanel>
</Popup>
<Popup x:Name="Popup_data" AllowsTransparency="True">
<StackPanel Background="BurlyWood">
<TextBlock Name ="T3" TextWrapping="Wrap" Text="Please enter the time to wait after trigger in milliseconds."/>
<TextBox Name="T4" Text="Enter value here" KeyDown="T4_KeyDown"/>
<TextBlock TextWrapping="Wrap">
<TextBlock.Text>
Detail - In the data trigger mode the camera waits a certain time after a mechanical pre-trigger and
then sends a trigger to the camera to take a picture after that interval. If you are using this mode.
Enter the time the camera has to wait after the trigger in teh textbox by first deleting the text
'Enter value here' and thentype in the interval time in milliseconds"
</TextBlock.Text>
</TextBlock>
</StackPanel>
</Popup>
If you need the popup to remain open to receive input, you’ll need to set the
StaysOpenproperty toTrue. Otherwise, the popup will close as soon as focus or activation leaves the popup.