Skip to content
Menu
Menu

Knowledge Base

EXAMPLE PROJECT – OPEN POPUP AT EVENT

EXAMPLE PROJECT – OPEN POPUP AT EVENT

Version Elvis 3.3.67
Created on 20.10.2016
Included features Automatically open a popup on event

Download Project

Note: Please unpack the zip file with a packing program (e.g. 7-Zip) or call up the properties of the downloaded zip file and check the “Allow” box if you are on the safe side. Otherwise the dll files will be blocked!

Task

A popup is supposed to open when the doorbell rings.

Expiration

  • The popup is attached here in the title bar; In principle, everything that is always visible via PageMaster is suitable.
  • The opening is done here by binding IsOpen to the doorbell data point.
  • Closing via a CommandButton that triggers the Application.Close command, which closes the active popup (Properties -Action – Command->>> “Close”).
  • The content of the popup is a part.

Implementation

  1. Create a doorbell data point with DPT BooleanCmd.
  2. Create part with CommandButton. In the properties of the CommandButton, select “Action” – “Command” ->> “Close”. After that, “Build Solution”.
  3. Open “TitelBar” in the “Master” folder and drag and drop the part onto the title bar.
  4. Convert part into a popup via context menu -> select “automatically close” here. Then delete the now visible “CommandButton”. Now you have to make some changes here in the code, because this cannot be set via the property field.
    This is what the code looks like after deleting the CommandButton (depending on which name you have assigned for the part, it will appear here).
    <Popup x:Name=”MyPopup” AllowsTransparency=”True” PopupAnimation=”Slide” Placement=”Relative” PlacementTarget=”{Binding ElementName=Part2OpenClose}” StaysOpen=”False”>
    <Parts:Part x:Name=”MyPopup”/>
    </Popup>
    Here the riser is modified as follows!
    <Popup Name=”MyPopup” PlacementTarget=”{Binding MainWindow}” Placement=”Center” IsOpen=”{Binding [Datenpunkte\Doorbell]. Value}”>
    <Parts:MyPopup/>
    </Popup>
  5. After that, place the DP on one side (simulates the bell) and start the designer.
    Now, when you press the bell, the popup will open.

Support Area

EXAMPLE PROJECT – OPEN POPUP AT EVENT

Knowledge Base

Here you will find answers, solutions to problems and examples of our products.
EXAMPLE PROJECT – OPEN POPUP AT EVENT

Case Studies

Successful in use: practical examples of our products and individual developments.
EXAMPLE PROJECT – OPEN POPUP AT EVENT

Support

Describe your concern using our support form.
EXAMPLE PROJECT – OPEN POPUP AT EVENT

License registration

Register your Elvis license!

IT GmbH · An der Kaufleite 12 · D-90562 Kalchreuth

© Copyright 2024. IT GmbH | Webdesign by Appear Online