0

コンボボックスの選択された値の変更によってアクティブ化されるポップアップがアプリケーションにあります。VS 2010でデバッグすると正常に動作しますが、同じコンピューターで.exeを使用すると起動しません。

.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コード

 <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>
4

1 に答える 1

0

入力を受け取るためにポップアップを開いたままにする必要がある場合は、StaysOpenプロパティをに設定する必要がありますTrue。それ以外の場合、フォーカスまたはアクティブ化がポップアップを離れるとすぐにポップアップが閉じます。

于 2012-08-09T18:34:42.483 に答える